id = "wasmtime" name = "Wasmtime" homepage = "https://wasmtime.dev/" description = "A standalone runtime for WebAssembly." executables = ["wasmtime"] [dotfiles] # https://docs.wasmtime.dev/cli-cache.html documents the TOML cache config # created by `wasmtime config new`; the generated API docs at # https://docs.rs/wasmtime/latest/wasmtime/struct.CacheConfig.html identify # its Unix default as $HOME/.config/wasmtime/config.toml. [appData] has that # XDG spelling on Linux and the platform-native config spelling on macOS. paths = ["[appData]/wasmtime/config.toml"] exclude = [] secret = [] side_effect = false # The cache directory is an absolute, machine-local storage choice from the # documented [cache] table, so retain it for backup but do not apply it. [[dotfiles.machine_lines]] file = "[appData]/wasmtime/config.toml" match = { key_path = ["cache.directory"] } scope = "backup" [commands] format = 1 label = "Run a WebAssembly file" description = "Run a .wasm or .wat file, optionally calling one export. Wasmtime flags must precede the file; program arguments follow it. The -O/-C/-D/-W/-S tuning options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "posix", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "docs" kind = "manual" url = "https://docs.wasmtime.dev/cli-options.html" revision = "2026-10-27" evidence = """ wasmtime run foo.wasm wasmtime foo.wat wasmtime --dir . foo.wasm wasmtime run --invoke initialize foo.wasm wasmtime run --invoke add add.wasm 1 2 All Wasmtime options must come before the WebAssembly file provided. All arguments afterwards are passed to the WebAssembly file itself. """ [[commands.field]] id = "dir" label = "Directory to expose to the program" type = "path" path = { kind = "directory", role = "input" } option = ["--dir"] multiple = true sources = ["docs"] [[commands.field]] id = "invoke" label = "Export to invoke instead of the main entry" type = "string" option = ["--invoke"] sources = ["docs"] [[commands.field]] id = "module" label = "WebAssembly file" type = "path" path = { kind = "file", role = "input" } position = 0 sources = ["docs"] [[commands.field]] id = "args" label = "Program arguments" type = "string" position = 1 multiple = true sources = ["docs"] [[commands.task]] id = "run" label = "Run a program" fields = ["module", "args", "dir"] required = ["module"] [[commands.task]] id = "invoke" label = "Call one export" fields = ["module", "invoke", "args"] required = ["module", "invoke"] [[commands.group]] id = "basic" label = "Basic" fields = ["module", "args", "dir", "invoke"]