-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to WASMI engine in icu_codepointtrie_builder #4621
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Here is the output of depscheck with this PR:
|
On main:
On this PR:
Please let me know what you all think. I don't want to sink more time into this until we know which direction we're taking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this approach. I'm okay with the slowdown, though I think we can potentially speed things up by building via ranges instead of codepoint by codepoint.
wasmi = "0.31.2" | ||
wasmi_wasi = "0.31.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: why are these non-optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
clippy::unwrap_used, | ||
clippy::expect_used, | ||
clippy::panic, | ||
// This Datagen-only builder code may panic when interacting with WASM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: datagen is not really a concept in this crate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the docs
I managed to get rid of the WASI requirement at runtime entirely, which eliminates a ton of dependencies. We still need WASI for building the C++ code, but the linker strips out all of the runtime WASI symbols. This is enabled by Reactor Modules which are a relatively recent change to the WASI spec. |
2 => 0, // UCPTRIE_VALUE_BITS_16 | ||
4 => 1, // UCPTRIE_VALUE_BITS_32 | ||
1 => 2, // UCPTRIE_VALUE_BITS_8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sigh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impressive size reduction!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also hooray we don't need to dedup syn anymore
either way i have most of the work done for that in wasmi-labs/wasmi#941
Fixes #3241
I switched our WASM engine to
wasmi
because it is faster to compile and has fewer dependencies. I changed how we interact with C++, too, in order to improve the performance.