-
Notifications
You must be signed in to change notification settings - Fork 32
Add support for both wasmtime latest (39.x) and LTS (36.x) versions #301
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
base: main
Are you sure you want to change the base?
Conversation
a2ea5a0 to
ae7ec12
Compare
Introduces wasmtime_lts feature flag to switch between wasmtime versions. Default uses latest (39.0.1), pass --lts flag to AOT compiler or enable wasmtime_lts feature for LTS version (36.0.3). CI updated to test both. Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
ae7ec12 to
165ceab
Compare
|
LGTM, but shouldn't default be LTS? Otherwise it would be a break change. Or maybe that's what we want? |
| // Re-export wasmtime based on expected version | ||
| #[cfg(all(feature = "wasmtime_latest", feature = "wasmtime_lts"))] | ||
| compile_error!( | ||
| "Features 'wasmtime_latest' and 'wasmtime_lts' are mutually exclusive. Please enable only one." | ||
| ); | ||
|
|
||
| #[cfg(not(any(feature = "wasmtime_latest", feature = "wasmtime_lts")))] | ||
| compile_error!("Either 'wasmtime_latest' or 'wasmtime_lts' feature must be enabled."); | ||
|
|
||
| #[cfg(not(feature = "wasmtime_lts"))] | ||
| extern crate wasmtime; | ||
| #[cfg(feature = "wasmtime_lts")] | ||
| extern crate wasmtime_lts as wasmtime; | ||
|
|
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.
Is there any value in making these not mutually exclusive? If both are enabled, we could default to one of them, similar to mshv and mshv3 used to work in hyperlight. I think mutually exclusive features are generally discouraged
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 didn't think there was any value in having both. I did default to one in the cargo.toml so that the users wouldn't need to choose. If its discouraged I could try it with both
I don't think it is a breaking change, just a decency bump. My thought was that most WASM users would want to the latest wasmtime. |
Introduces wasmtime_lts feature flag to switch between wasmtime versions.
Default uses latest (39.0.1), pass --lts flag to AOT compiler for LTS version (36.0.3). CI updated to test both.