-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Overriding argv[0] for wasmtime run #8955
Copy link
Copy link
Closed
Description
Feature
I would like it to be possible to override argv[0] for commands executed with wasmtime run. E.g.:
wasmtime run --argv0=clang++ bin/clang.wasm ...
Benefit
Certain applications use the value of argv[0] to:
- Dispatch between incompatible code paths (multi-call binaries), e.g. Clang;
- Discover location of data via executable-relative paths, e.g. also Clang in some cases (not the usual configuration though).
In general I think the path passed to wasmtime run is only meaningful on the host and will rarely if ever mean anything within the sandbox.
Implementation
A new option --argv0= would work for me, but really anything that gets the job done is fine.
Alternatives
I can't think of any besides not having the functionality.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels