3 unstable releases

0.2.1 Feb 5, 2024
0.2.0 Jun 4, 2021
0.1.0 Jan 16, 2021

#1456 in Text processing

Download history 253/week @ 2024-07-21 230/week @ 2024-07-28 195/week @ 2024-08-04 187/week @ 2024-08-11 192/week @ 2024-08-18 174/week @ 2024-08-25 187/week @ 2024-09-01 228/week @ 2024-09-08 264/week @ 2024-09-15 306/week @ 2024-09-22 342/week @ 2024-09-29 182/week @ 2024-10-06 172/week @ 2024-10-13 144/week @ 2024-10-20 179/week @ 2024-10-27 169/week @ 2024-11-03

670 downloads per month
Used in 20 crates (via tectonic_xetex_layout)

MIT license

7KB

The tectonic_bridge_icu crate

This crate is part of the Tectonic project. It exposes the C API of the ICU4C Unicode library the Rust/Cargo build framework, with no Rust bindings.

There are a variety of other low-level ICU-related crates available, with rust_icu perhaps taking the most systematic approach. This package is distinctive because:

  • It uses Tectonic’s dependency-finding framework, which supports both pkg-config and vcpkg.
  • It ensures the ICU C API is exposed to Cargo.
  • Because it does not need to provide Rust bindings, it avoids a good deal of grief relating to bindgen, symbol versioning, etc.

Ideally, though, one day this crate will be superseded by a true Rust “sys crate”.

If your project depends on this crate, Cargo will export for your build script an environment variable named DEP_ICUUC_INCLUDE_PATH, which will be a semicolon-separated list of C include directories enabling your code to include the unicode/* 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_icu;

Cargo features

At the moment this crate does not provide any Cargo features.

Dependencies

~26KB