Add support for both wasmtime latest (39.x) and LTS (36.x) versions#301
Add support for both wasmtime latest (39.x) and LTS (36.x) versions#301jsturtevant wants to merge 1 commit intohyperlight-dev:mainfrom
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.
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.
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.