alexcrichton opened PR #14217 from alexcrichton:env-var-options to bytecodealliance:main:
This commit adds support to use environment variables in addition to CLI
flags when configuringwasmtimeexecution. This is applied to all
"option groups" of Wasmtime, such as-W,-S,-O, etc. Options can
be specified as a group:WASMTIME_OPTIMIZE=opt-level=1,...or individually:
WASMTIME_OPTIMIZE_OPT_LEVEL=1CLI configuration overrides environment variables, and environment
variables override file-based configuration. Errors are reported as
usual if any environment variable fails to parse.Note: I wasn't super happy with the state of
cli_tests.rsso I did some initial refactoring in the first commit in this PR. That's not specifically related to this change and isn't intended to change anything, but is aspirationally a cleanup of those tests.
alexcrichton requested pchickey for a review on PR #14217.
alexcrichton requested wasmtime-core-reviewers for a review on PR #14217.
alexcrichton requested fitzgen for a review on PR #14217.
alexcrichton requested wasmtime-default-reviewers for a review on PR #14217.
:thumbs_up: pchickey submitted PR review:
Looks good, thank you for cleaning up the cli tests stuff as well
alexcrichton has enabled auto merge for PR #14217.
alexcrichton added PR #14217 Support environment variables for most CLI arguments to the merge queue.
:check: alexcrichton merged PR #14217.
alexcrichton removed PR #14217 Support environment variables for most CLI arguments from the merge queue.
Last updated: Aug 30 2026 at 09:07 UTC