utf8proc/lib.rs
1//! Rust bindings to the [utf8proc] library supporting normalization,
2//! case-folding, and character class testing.
3//!
4//! A statically linked binary is under 350K, yet can replace the functionality of the [`unicode-width`] and [`unicode-normalization`] crates, among others.
5//! It is used for Unicode implementation in the Julia programming language.
6//!
7//! # Limitations
8//! The underlying utf8proc library does not support any "derived properties", including the `XID_Start`/`XID_Continue` properties.
9//! For this purpose, the [`unicode-ident`] crate is recommended.
10//! It is very fast and needs only ~10KiB of static storage.
11//! Emulating this functionality would be slow and/or require additional static storage.
12//!
13//! It also does not support lookup or resolution of character names.
14//! For that, consider the [`unicode_names2`] crate.
15//!
16//! The safe bindings does not (yet) wrap all the functionality that the C library does.
17//! PRs are welcome.
18//!
19//! [utf8proc]: https://juliastrings.github.io/utf8proc/
20//! [`unicode-ident`]: https://docs.rs/unicode-ident/1/unicode_ident/
21//! [`unicode-width`]: https://docs.rs/unicode-width/latest/unicode_ident/
22//! [`unicode_names2`]: https://docs.rs/unicode_names2/2/unicode_names2/
23//! [`unicode-normalization`]: https://docs.rs/unicode-normalization/latest/unicode_normalization/
24#![deny(missing_docs)]
25#![forbid(clippy::cast_sign_loss, reason = "prefer cast_unsigned")]
26
27pub mod case;
28mod error;
29pub mod grapheme;
30pub mod properties;
31pub mod transform;
32mod version;
33
34pub use self::error::{Error, ErrorKind};
35pub use self::version::*;