Open marmeladema opened 3 years ago
Thanks for the report! This isn't supported well today unfortunately. Some initial work was done at https://github.com/bytecodealliance/cargo-wasi/pull/19 but it stalled out because I don't think there's an idea of what the best design for this is right now.
From a user perspective, I think I would prefer the cargo metadata option the most because I think people should not have to know which wasmtime features to enable or disable. If you agree with this, and if we restrict ourselves to specifying only wasmtime features, how much work do you think it would be?
What I had in mind was something like:
[package.metadata.wasi.wasmtime.features]
simd = true
or if we want to have per profile configuration:
[package.metadata.wasi.wasmtime.profile.release]
features = { simd = true }
@alexcrichton I don't know exactly what changed but I am now able to run cargo wasi
without problem! Maybe the simd feature is enabled by default now?
Anyway, that's really neat, I was able to port sliceslice to wasm32 :+1:
Hello!
I am very new to the wasm ecosystem and trying a bit all the tools/framework/runtime out there. I am working on porting https://github.com/cloudflare/sliceslice-rs to wasm. That project requires simd instructions to work.
I have a wip branch working but to run the tests, I cannot simple do:
because the simd feature of wasmtime is not enabled by default.
My problem is that I haven't found a way to enable simd from cargo-wasi. To run the tests, I have to manually run:
but that requires finding the wasm binary path which is not easily predictable.
My question is then: is there a way to pass command line options to wasmtime? I can see different options if that's not already implemented:
cargo wasi test
Thank you in advance for taking the time to read this :+1: