2 releases (1 stable)

Uses new Rust 2021

1.0.0 Sep 27, 2022
0.6.0 May 17, 2022

#44 in Internationalization (i18n)

Download history 14/week @ 2022-08-08 5/week @ 2022-08-15 8/week @ 2022-08-22 7/week @ 2022-08-29 12/week @ 2022-09-05 8/week @ 2022-09-12 14/week @ 2022-09-19 38/week @ 2022-09-26 33/week @ 2022-10-03 12/week @ 2022-10-10 5/week @ 2022-10-17 16/week @ 2022-10-24 14/week @ 2022-10-31 19/week @ 2022-11-07 18/week @ 2022-11-14 11/week @ 2022-11-21

62 downloads per month
Used in 3 crates


144K SLoC

icu_capi crates.io

This crate contains the source of truth for the Diplomat-generated FFI bindings. This generates the C, C++ and Wasm bindings. This crate also contains the extern "C" FFI for ICU4X.

While the types in this crate are public, APIs from this crate are not intended to be used from Rust and as such this crate may unpredictably change its Rust API across compatible semver versions. The extern "C" APIs exposed by this crate, while not directly documented, are stable within the same major semver version, as are the bindings exposed under the cpp/ and wasm/ folders.

This crate may still be explored for documentation on docs.rs, and there are generated language-specific docs available as well. C++ has sphinx docs in cpp/docs/, and the header files also contain documentation comments. The JS/WASM port has sphinx docs under wasm/icu4x/docs, and the TypeScript sources in wasm/icu4x/lib are compatible with tsdoc.

This crate is no_std and will not typically build as a staticlib on its own, if you wish to link to it you should prefer using icu_capi_staticlib, or for more esoteric platforms you may write a shim crate depending on this crate that hooks in an allocator and panic hook.

More information on using ICU4X from C++ can be found in our tutorial.

To re-generate the bindings run:

cargo make diplomat-install
cargo make diplomat-gen

More Information

For more information on development, authorship, contributing etc. please visit ICU4X home page.


~77K SLoC