proxy-wasm-cpp-host icon indicating copy to clipboard operation
proxy-wasm-cpp-host copied to clipboard

Wasmtime default features disabled

Open rahulchaphalkar opened this issue 2 years ago • 4 comments

Hi there, I'm curious why the default features for wasmtime are disabled? https://github.com/proxy-wasm/proxy-wasm-cpp-host/blob/b0a0594e8ab4023857393fab349170fb487ec5a9/bazel/cargo/wasmtime/Cargo.toml#L13

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!

rahulchaphalkar avatar Oct 14 '22 02:10 rahulchaphalkar

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.

PiotrSikora avatar Oct 14 '22 03:10 PiotrSikora

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

rahulchaphalkar avatar Oct 14 '22 19:10 rahulchaphalkar

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.

PiotrSikora avatar Oct 15 '22 10:10 PiotrSikora

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 https://github.com/proxy-wasm/proxy-wasm-cpp-host/blob/b7e690703c7f26707438a2f1ebd7c197bc8f0296/bazel/cargo/wasmtime/Cargo.toml#L14

rahulchaphalkar avatar Sep 13 '23 23:09 rahulchaphalkar