A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Allow using wasmtime wast builtins on the CLI (#13065)
Alex Crichtonf078c7537552
diff --git a/src/commands/wast.rs b/src/commands/wast.rsindex 8f7a318b3c..c7f859519d 100644--- a/src/commands/wast.rs+++ b/src/commands/wast.rs@@ -37,6 +37,11 @@ pub struct WastCommand {/// Wasmtime itself.#[arg(long = "async", require_equals = true, value_name = "true|false")]async_: Option<Option<bool>>,++ /// Whether or not to enable wasmtime's builtin functions for the `*.wast`+ /// to import.+ #[arg(long = "wasmtime-builtins")]+ wasmtime_builtins: bool,}impl WastCommand {@@ -81,6 +86,10 @@ impl WastCommand {wast_context.precompile_load(path);}+ if self.wasmtime_builtins {+ wast_context.register_wasmtime()?;+ }+for script in self.scripts.iter() {wast_context.run_file(script)