Open-source project
unicode-org/icu4x avatar
unicode-org/icu4x

ICU4X for Rust: Modular Internationalization

Solving i18n for client-side and resource-constrained environments.

1,875 stars299 forksRustNOASSERTION

At a glance

What is it?
ICU4X is a Rust internationalization platform designed around modular components, pluggable locale data, and constrained client environments. Its repository includes bindings-oriented directories for several languages and platforms.
Who is it for?
ICU4X fits Rust teams that need locale-aware formatting with controlled data delivery, especially for browsers, mobile clients, wearables, and embedded targets. It is less suitable for a team that wants a single conventional ICU installation, broad native-library compatibility, or a build process without compiled locale data.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

ICU4X's target environments and component model

ICU4X addresses internationalization for client-side software, particularly applications that cannot assume a large system locale database. The project charter names web platforms, iOS, Android, WearOS, WatchOS, Flutter, and Fuchsia as target environments, with intended support for Rust, JavaScript, Objective-C, Java, Dart, and C++. That is a compatibility goal expressed in the charter, not a claim that every binding currently exposes every component.

The repository layout reflects a component-oriented design. Core locale functionality lives under `components/locale_core`, while separate packages cover calendars, date and time formatting, decimal formatting, plural rules, case mapping, collation, segmentation, normalization, lists, locale fallback, and Unicode properties. This separation lets an application depend on the internationalization capabilities it needs rather than importing one indivisible localization stack.

The main `icu` package provides a higher-level entry point. Its workspace also includes provider crates, FFI directories, generated data crates, utilities, tools, and tutorials. For engineers, that split is more significant than the project description alone: it exposes choices about application code, locale-data delivery, bindings, and build tooling.

From CLDR data to compiled ICU4X locale data

ICU4X draws locale information from CLDR and takes design influence from ICU4C, ICU4J, and ECMA-402. Its Rust implementation separates components from providers. Provider-related workspace entries include `baked`, `blob`, `source`, `fs`, `registry`, and `export`. Based on those package names, ICU4X supports several data-related approaches, including generated or baked data, blob-oriented data, source data, filesystem access, and registries.

The architecture therefore separates internationalization logic from the locale information required at runtime. A date formatter, for example, needs formatting code and data for its locale and selected field set. The README quick start creates a `DateTimeFormatter` for Spanish and requests `YMD::long()`. Its error message, `"locale should be present in compiled data"`, confirms that the example expects locale information to have been included in compiled data.

This design is relevant to resource-constrained clients because an application can control which data is compiled or delivered rather than depending on a full locale database being present on the host. The README does not provide exact configuration commands for selecting a provider or excluding locales, so those details must be checked in the relevant provider documentation before estimating binary size or deployment requirements.

Adding ICU4X and formatting the first Spanish date

The README does not give a separate system installation command. It presents ICU4X as a Rust package added through `Cargo.toml`. For the documented quick start, add the following dependency to the project manifest. The README uses version `2.0.0` even though newer releases are listed, so this example should be treated as the exact published example rather than a current version recommendation.

toml
[dependencies]
icu = "2.0.0"

Then create a Rust source file based on the README's quick start. It constructs an ISO date, selects a long year-month-day presentation, and formats the date for the Spanish locale.

rust
use icu::calendar::Date;
use icu::datetime::{DateTimeFormatter, fieldsets::YMD};
use icu::locale::locale;

let dtf = DateTimeFormatter::try_new(
    locale!("es").into(),
    YMD::long()
)
.expect("locale should be present in compiled data");

let date = Date::try_new_iso(2020, 9, 12).expect("date should be valid");
let formatted_date = dtf.format(&date).to_string();

The documented expected result is `"12 de septiembre de 2020"`. This is a meaningful first use because it exercises locale selection, compiled data availability, calendar construction, a date field set, and formatting rather than merely printing a static string.

Language bindings and the boundary of the README examples

The repository contains examples for C, C++, Dart, JavaScript, npm, Cargo, a C tiny example, and a JavaScript tiny example. It also includes `ffi/capi`, `ffi/ecma402`, and `ffi/freertos`. These paths show that ICU4X is not designed solely as a Rust library with incidental wrappers. Its architecture includes native FFI, an ECMA-402-facing layer, and an embedded-oriented target.

However, the README does not document how to build each binding, which runtime packages correspond to every example, or whether every component is available through every language interface. The charter's list of supported languages and platforms describes intended availability and ease of use. It should not be read as proof of feature parity.

This distinction matters when selecting ICU4X for a mixed-language product. A Rust team can use the packages shown in the quick start. A JavaScript or Dart team needs to verify the relevant example and published package documentation before estimating API coverage. A C or embedded team must also account for a different integration surface from an ordinary Cargo dependency. The presence of `examples/c-tiny` and `ffi/freertos` makes embedded use visible in the repository, but the README does not state memory measurements or supported board configurations.

Data sizing benefits and the cost of compiled locale coverage

Small, modular code and pluggable locale data are explicit ICU4X design goals. Those choices are especially relevant where deployment size and runtime resources matter. The component split limits what an application must include at a conceptual level, while provider packages offer different routes for obtaining locale data.

The trade-off is that compiled data is not automatic in every deployment model. The quick start can fail while constructing `DateTimeFormatter` when Spanish data is absent from the compiled set. That failure appears as a returned error from `DateTimeFormatter::try_new`, which the example converts into an expect message. Locale fallback and runtime lookup behavior are separate concerns in the workspace, with dedicated crates for `locale_fallback`, `blob`, and `fs`, but the README does not describe the operational behavior of those providers.

Consequently, ICU4X is not merely a code-size decision. Engineers must decide which locales, components, and presentation data to ship. A small application with a few required locales can potentially benefit from a focused data build. A product needing broad locale coverage will face a larger data and build-management problem. No binary-size figures are supplied in the README, so claims about a particular footprint would need evidence from the selected provider and build configuration.

ICU4X compared with conventional ICU deployment

The most relevant alternative described by the project is the ICU4C and ICU4J family that ICU4X explicitly references. Conventional ICU deployments commonly center on established ICU libraries and their locale data, while ICU4X starts with modular Rust components and pluggable providers for constrained clients. The README does not claim that ICU4X reproduces every ICU4C or ICU4J API.

That difference is architectural rather than a simple newer-versus-older naming choice. ICU4X's workspace includes separate component crates, data-generation and delivery packages, FFI layers, and bindings-oriented examples. Its API direction also includes ECMA-402 compatibility as a stated goal. A team already standardized on ICU4C or ICU4J may have more existing integration knowledge and native-library conventions than ICU4X documentation covers.

ICU4X is the better fit when the application is written in Rust, targets a client or constrained runtime, and benefits from selecting locale data explicitly. It is the weaker fit when compatibility with an existing ICU4C or ICU4J deployment is the main requirement. The README does not provide a complete API comparison, feature matrix, or migration guide, so that compatibility must be checked component by component.

Release cadence, governance, and licensing boundaries

The repository is not archived, and the last push was on 2026-10-15. Recent releases listed for the `icu` package include `[email protected]` on 2026-08-21, `[email protected]` on 2026-08-14, and `[email protected]` on 2026-04-01. This supports recent release activity, but it does not remove the need to read `CHANGELOG.md` for component-specific changes.

Development is governed by the ICU4X Technical Committee in the Unicode Consortium. The README says the ICU4X-TC convenes approximately once per quarter in advance of releases, while interim work is handled by the ICU4X Working Group. Working Group recommendations are subject to Technical Committee approval. This is a defined governance model, although it is not a promise of a particular response time for an individual issue or pull request.

The repository uses the `LICENSE` file and identifies the Unicode License, which is based on the MIT license but expressly covers data and data files as well as code. The repository also states that copyright and terms of use are governed by Unicode policies. Because the license is custom from GitHub's classification perspective, review `LICENSE` for the exact terms covering the code and locale data you distribute. A CLA is required to contribute. The README does not document a separate compatibility promise or a dedicated rollback procedure.

Editorial conclusion

ICU4X fits Rust teams that need locale-aware formatting with controlled data delivery, especially for browsers, mobile clients, wearables, and embedded targets. It is less suitable for a team that wants a single conventional ICU installation, broad native-library compatibility, or a build process without compiled locale data. Review `LICENSE` for the Unicode License terms, compare the data provider required by the deployment model, and confirm that the targeted component and locale data are available before adopting it.

Frequently asked questions

What is ICU4X used for?

ICU4X provides internationalization components for client-side software and resource-constrained environments. Its design goals include small, modular code and pluggable locale data.

How do I add ICU4X to a Rust project?

The README quick start adds `icu = "2.0.0"` under `[dependencies]` in `Cargo.toml`. That is the exact documented example, while the repository also lists newer `icu` releases.

Which programming languages and platforms does ICU4X target?

The charter names Rust, JavaScript, Objective-C, Java, Dart, and C++, along with web, mobile, wearable, Flutter, and Fuchsia environments. The repository includes examples and FFI directories for several of these targets.

Does ICU4X use conventional ICU locale data?

ICU4X relies on data from CLDR and takes design influence from ICU4C, ICU4J, and ECMA-402. The README does not claim feature parity with every conventional ICU API.

What license covers ICU4X?

The project identifies the Unicode License in its `LICENSE` file. The README says it is based on the MIT license but expressly covers data and data files as well as code.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. unicode-org/icu4x on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/unicode-org-icu4x.svg)](https://hysenlabs.com/projects/unicode-org-icu4x)

Was this useful?