proxy-wasm/proxy-wasm-cpp-host

Wasmtime default features disabled

rahulchaphalkar opened this issue · 4 comments

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!

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.

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

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.

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']}