forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
wasmtime run --argv0 NAME ...
(bytecodealliance#8961)
This commit adds support for a new `--argv0` flag to the `wasmtime run` CLI (and only `wasmtime run`, not other subcommands). This flag is used to override the inferred value of the first argument which is sometimes used to dispatch on various pieces of functionality. This enables avoiding the need to copy around wasm files. Closes bytecodealliance#8955
- Loading branch information
1 parent
de29ce3
commit af95475
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fn main() { | ||
let mut args = std::env::args(); | ||
assert_eq!(args.next(), args.next()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters