Skip to content
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

Wasmtime default features disabled #313

Open
rahulchaphalkar opened this issue Oct 14, 2022 · 4 comments
Open

Wasmtime default features disabled #313

rahulchaphalkar opened this issue Oct 14, 2022 · 4 comments

Comments

@rahulchaphalkar
Copy link

Hi there,
I'm curious why the default features for wasmtime are disabled?

wasmtime = {version = "0.39.1", default-features = false, features = ['cranelift']}

I tried to look when this change was made, but looks like default features were disabled from the time wasmtime was added as a runtime. I changed it to true for wasmtime 1.0.1 version, and I was able to build it without much issue (had to resolve one duplicate dependency conflict in BUILD.cpufeatures-xxx similar to rustix crate).
Particularly interested since several newer optimizations for wasmtime-1.0.0 (as well as helpful features, e.g. related to profiling) seem to be included in default features.

Or is there a different place to implement these features that I've missed?
Thanks!

@PiotrSikora
Copy link
Contributor

Those dependencies are from https://github.com/bytecodealliance/wasmtime/blob/v0.39.1/crates/c-api/Cargo.toml, which is the root crate that we use to generate Bazel rules.

@rahulchaphalkar
Copy link
Author

Ah, thanks!
So apart from optional features like cranelift, other features which are enabled in wasmtime crate (pooling-allocator for example below) will be applied as well right?
pooling-allocator = ["wasmtime-runtime/pooling-allocator"]
https://github.com/bytecodealliance/wasmtime/blob/19b5436ac346b8e61230baeaf18e802db6f0b858/crates/wasmtime/Cargo.toml#L93

@PiotrSikora
Copy link
Contributor

So apart from optional features like cranelift, other features which are enabled in wasmtime crate (pooling-allocator for example below) will be applied as well right?

No, I believe that default-features = false disables those.

@rahulchaphalkar
Copy link
Author

The default-features=false has been removed in the v9.0.3 version of wasmtime, https://github.com/bytecodealliance/wasmtime/blob/271b605e8d3d44c5d0a39bb4e65c3efb3869ff74/crates/c-api/Cargo.toml#L23
Would it be appropriate to make the corresponding change in this repo as well? Remove default-features=false here

wasmtime = {version = "9.0.3", default-features = false, features = ['cranelift']}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants