Wasmtime: allow using the experimental Cranelift x64 backend in cli;

This introduces two changes:

- first, a Cargo feature is added to make it possible to use the
Cranelift x64 backend directly from wasmtime's CLI.
- second, when passing a `cranelift-flags` parameter, and the given
parameter's name doesn't exist at the target-independent flag level, try
to set it as a target-dependent setting.

These two changes make it possible to try out the new x64 backend with:

    cargo run --features experimental_x64 -- run --cranelift-flags use_new_backend=true -- /path/to/a.wasm

Right now, this will fail because most opcodes required by the
trampolines are actually not implemented yet.
This commit is contained in:
Benjamin Bouvier
2020-06-15 17:13:10 +02:00
parent eb548e263d
commit c2692ecb8a
5 changed files with 29 additions and 6 deletions

View File

@@ -81,6 +81,10 @@ lightbeam = [
jitdump = ["wasmtime/jitdump"]
vtune = ["wasmtime/vtune"]
# Try the experimental, work-in-progress new x86_64 backend. This is not stable
# as of June 2020.
experimental_x64 = ["wasmtime-jit/experimental_x64"]
[badges]
maintenance = { status = "actively-developed" }