Skip to content

Conversation

@jsturtevant
Copy link
Contributor

@jsturtevant jsturtevant commented Dec 10, 2025

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.

@jsturtevant jsturtevant added the kind/enhancement New feature or request label Dec 10, 2025
@jsturtevant jsturtevant marked this pull request as draft December 10, 2025 04:33
@jsturtevant jsturtevant force-pushed the update-wasmtime branch 6 times, most recently from a2ea5a0 to ae7ec12 Compare December 13, 2025 00:04
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>
@jsturtevant jsturtevant marked this pull request as ready for review December 16, 2025 20:17
@ludfjig
Copy link
Contributor

ludfjig commented Dec 17, 2025

LGTM, but shouldn't default be LTS? Otherwise it would be a break change. Or maybe that's what we want?

Comment on lines +22 to +35
// 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;

Copy link
Contributor

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

Copy link
Contributor Author

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

@jsturtevant
Copy link
Contributor Author

Otherwise it would be a break change. Or maybe that's what we want?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants