Add a wasmtime settings command to print Cranelift settings.
This commit adds the `wasmtime settings` command to print out available Cranelift settings for a target (defaults to the host). The compile command has been updated to remove the Cranelift ISA options in favor of encouraging users to use `wasmtime settings` to discover what settings are available. This will reduce the maintenance cost for syncing the compile command with Cranelift ISA flags.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
use anyhow::Result;
|
||||
use structopt::{clap::AppSettings, clap::ErrorKind, StructOpt};
|
||||
use wasmtime_cli::commands::{
|
||||
CompileCommand, ConfigCommand, RunCommand, WasmToObjCommand, WastCommand,
|
||||
CompileCommand, ConfigCommand, RunCommand, SettingsCommand, WasmToObjCommand, WastCommand,
|
||||
};
|
||||
|
||||
/// Wasmtime WebAssembly Runtime
|
||||
@@ -42,6 +42,8 @@ enum WasmtimeApp {
|
||||
Compile(CompileCommand),
|
||||
/// Runs a WebAssembly module
|
||||
Run(RunCommand),
|
||||
/// Displays available Cranelift settings for a target.
|
||||
Settings(SettingsCommand),
|
||||
/// Translates a WebAssembly module to native object file
|
||||
#[structopt(name = "wasm2obj")]
|
||||
WasmToObj(WasmToObjCommand),
|
||||
@@ -56,6 +58,7 @@ impl WasmtimeApp {
|
||||
Self::Config(c) => c.execute(),
|
||||
Self::Compile(c) => c.execute(),
|
||||
Self::Run(c) => c.execute(),
|
||||
Self::Settings(c) => c.execute(),
|
||||
Self::WasmToObj(c) => c.execute(),
|
||||
Self::Wast(c) => c.execute(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user