Open
Description
For Dart we need to ship precompiled binaries, as there is not Rust compiler available in the Dart toolchain (and no appetite to add one). However, the pub.dev package manager has a size limit of 100MB per package, which would be enough if we didn't have to ship separate binaries for all 27 supported platforms.
This means we will need some other mechanism for distributing binaries. Options include:
- GitHub releases
- This should be the easiest way. We already have a proof-of-concept generating these using GitHub actions: https://github.com/robertbastian/icu4x/blob/728eb449584da57acc604466702a603c03a82e45/.github/workflows/artifacts-build.yml#L713-L759
- Unicode CDN
- A Unicode CDN is a long term plan for ICU4X distribution on the web. It does not exist yet, and the idea was more to use it to serve data packages to users, not binaries to developers.
In the library, we add build.dart
build script, which will download the binary from the source we're going with. Some open questions here are
- How do we configure this? There's currently no mechanism in Dart to parameterise dependencies
- Do we provide a non-network escape hatch, if the developer provides an ICU4X build themselves?
- How do we handle versioning?