10 releases

0.2.9 Feb 5, 2024
0.2.8 May 22, 2023
0.2.7 Oct 4, 2022
0.2.5 Apr 26, 2022
0.1.0 Jan 16, 2021

#350 in Build Utils

Download history 185/week @ 2024-07-26 166/week @ 2024-08-02 143/week @ 2024-08-09 173/week @ 2024-08-16 131/week @ 2024-08-23 130/week @ 2024-08-30 173/week @ 2024-09-06 218/week @ 2024-09-13 298/week @ 2024-09-20 269/week @ 2024-09-27 190/week @ 2024-10-04 152/week @ 2024-10-11 105/week @ 2024-10-18 104/week @ 2024-10-25 164/week @ 2024-11-01 48/week @ 2024-11-08

451 downloads per month
Used in 20 crates (2 directly)

MIT license

2MB
40K SLoC

C++ 35K SLoC // 0.3% comments Python 3.5K SLoC // 0.1% comments M4 1K SLoC // 0.3% comments Automake 654 SLoC // 0.0% comments C 210 SLoC // 0.2% comments Shell 149 SLoC // 0.1% comments Rust 144 SLoC // 0.2% comments Templ 40 SLoC // 0.6% comments

Contains (obscure autoconf code, 16KB) harfbuzz/configure.ac

The tectonic_bridge_harfbuzz crate

This crate is part of the Tectonic project. It exposes the C API of the Harfbuzz text shaping library the Rust/Cargo build framework, with no Rust bindings. By default, a static, local version of the Harfbuzz library is built.

While there are a variety of other Harfbuzz-related crates in the Rust ecosystem, Tectonic has specialized needs (e.g. support for the graphite2 smart font library). Hence this specialized crate.

If your project depends on this crate, Cargo will export for your build script an environment variable named DEP_HARFBUZZ_INCLUDE_PATH, which will be a semicolon-separated list of C include directories enabling your code to include the harfbuzz/ headers.

You will need to ensure that your Rust code actually references this crate in order for the linker to include linked libraries. A use statement will suffice:

#[allow(unused_imports)]
#[allow(clippy::single_component_path_imports)]
use tectonic_bridge_harfbuzz;

Cargo features

This crate provides the following Cargo features:

  • external-harfbuzz: instead of building a local copy of Harfbuzz, discover it as an external dependency using pkg-config or vcpkg, as determined by the tectonic_dep_support crate. This requires that all libraries upon which Harfbuzz depends also be found externally, since the external library can't then link against a local vendored version.

Dependencies