elixir-cldr / cldr_collation

CLDR Collation
Other
4 stars 4 forks source link

Move to rust-based icu_collator bindings #9

Open kipcole9 opened 1 year ago

kipcole9 commented 1 year ago

icu_collator is fully TR #10 compliant and being in Rust can enable a fast, safe and developer friendly experience. I see the following advantages:

@foxbenjaminfox has kindly offered to work on the Rust bindings while I work on the overall library, Elixir api and documentation.

Elixir Public API

The basic Elixir API (not the NIF API) I envisage as:

NIF API

This API needs to be as simple as possible and be driven by the needs of icu_collator and Rustler. Hopefully the interface can directly use the binaries in the Rust code without copying but the memory models are different and this may not be possible. Sorting by adjusting pointers would be more efficient than memory copies.

At minimum the NIF API should expect to accept:

It should be able to return: