ICU4X's core functionality is completely available from JS and TypeScript via WebAssembly, with bindings generated by Diplomat.
The NPM package can be found under ffi/npm
, with docs here.
We are still working on improving the user experience of using ICU4X from other languages. As such, this tutorial may be a bit sparse, but we are happy to answer questions on our discussions forum and help you out
Similar to C++, the JS APIs mirror the Rust code in the icu_capi
crate, which can be explored on [docs.rs][rust-docs], though the precise types used may be different.
See [ffi/npm/examples/wasm-demo
] for an NPM package that uses the ICU4X package. You can run it using npm run start
.
We hope to fill in these docs over time with more examples.