Stream: git-wasmtime

Topic: wasmtime / issue #189 Unable to disable default features ...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2024 at 19:27):

bjorn3 commented on issue #189:

This has been fixed by https://github.com/bytecodealliance/cranelift/pull/853, right?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2024 at 23:13):

cfallin closed issue #189:

I am interested in building Wasmtime against a Cranelift with all architectures disabled except for the target architecture.

From my research, it seems that the way to accomplish this would be to re-export the desired architecture feature in Wasmtime's cargo.toml:

riscv = ["cranelift-codegen/riscv"]

(For reference, the feature belongs to cranelift-codegen, whose features can be found in its cargo.toml file.)

However, cranelift-codegen's default configuration enables all architectures to begin with, so in order to re-apply only the desired one, I would need to disable the default features in Cranelift and then enable only the desired one by re-exporting the feature, as outlined above.

The Rust-official method to accomplish this is to use the --no-default-features flag, as outlined here. However, as I discovered today, the Wasmtime repository is set up as a workspace (rather than a package), and the flag is non-functional on workspaces -- it only works on packages.

cranelift-codegen is not a workspace by itself, so I also tried using the inline default-features = false option (example of that here); however, that didn't seem to work either.

Given this seems to be an upstream issue, I was wondering if there would be any guidance around this at all.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2024 at 23:13):

cfallin commented on issue #189:

I believe so; and the crate and feature structure has changed so much in the past five years anyway that any current problems can have new issues filed.


Last updated: Nov 22 2024 at 17:03 UTC