Add Wasmtime latest/LTS support with LTS default#301
Conversation
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. |
4c8fece to
5af7655
Compare
|
@jsturtevant let's get this merged but with LTS as default? |
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>
81c8017 to
1f5ced0
Compare
Map Wasmtime 45 direct errors into Hyperlight guest errors and avoid latest-only component post_return deprecation while preserving LTS behavior. Run clippy with the latest and LTS Wasmtime feature sets separately so mutually exclusive features are not enabled together. Signed-off-by: James Sturtevant <jsturtevant@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1f5ced0 to
975ae5e
Compare
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.