-
Notifications
You must be signed in to change notification settings - Fork 74
Don't use the corooteen library anymore #578
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
Conversation
|
The way it works is by having a When While this is a bit hacky, it is already how |
|
cc @pepyakin (might be interesting) |
|
It seems to sometimes freeze, which is worrisome. |
| _ => unreachable!(), | ||
| match self.instance.get_export(name) { | ||
| Some(wasmtime::Extern::Global(g)) => match g.get() { | ||
| wasmtime::Val::I32(v) => Ok(u32::from_ne_bytes(v.to_ne_bytes())), |
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.
for the love of the god, why?
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.
It's the only way I know to turn a i32 into a u32 with the same bits representation 🤷
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.
But isn't this, as well as a regular cast via as, is just a noop? Endianness doesn't matter when you speak about primitive values like here and as would just reinterpret the same bits as an unsigned value.
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.
Yeah, it's a noop. The point is to tell the Rust compiler that we want the u32 with the same bits as this i32.
|
|
|
Manage to reproduce a couple of freezes, but they were always networking-related. |
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
bytecodealliance/wasmtime#2434 has now been merged. This PR updates the code for this new feature and removes usage of
corooteen.Fix #276
One of the objectives would ultimately be to publish
smoldoton crates.io, so depending on agitversion is kind of "meh".However, in terms of dependencies, we're trading one crates.io dependency and one git dependency for one git dependency, which makes this trade neutral.