iawia002 requested elliottt for a review on PR #8970.
iawia002 requested wasmtime-core-reviewers for a review on PR #8970.
iawia002 requested wasmtime-default-reviewers for a review on PR #8970.
iawia002 opened PR #8970 from iawia002:cli-runtime-config
to bytecodealliance:main
:
Part of #8929
This patch adds two new flags:
-S runtime-config[=y|n] -- Enable support for WASI runtime config API (experimental) -S runtime-config-var=<name>=<val> -- Pass a wasi runtime config variable to the program.
Separating these two flags is considered to handle the scenario where the
wasi-runtime-config
API is enabled but no configuration needs to be passed.To use the
wasi-runtime-config
API inwasmtime-cli
:
- Build Wasmtime with
wasi-runtime-config
feature:cargo build --features wasi-runtime-config
- Enable
wasi-runtime-config
API support by-Sruntime-config
:wasmtime run/serve -Sruntime-config ...
- Pass custom runtime configs to the component:
wasmtime run/serve -Sruntime-config -Sruntime-config-var=key1=value1 -Sruntime-config-var=key2=value2 ...
cc @alexcrichton
alexcrichton submitted PR review:
Thanks for this!
alexcrichton submitted PR review:
Thanks for this!
alexcrichton created PR review comment:
Currently we assume that all features are enabled during testing, so it's ok to drop this and the marker below.
alexcrichton created PR review comment:
Could this be added to the on-by-default features list? That's generally what we're doing with WASI proposals right now so long as there's no extra build requirements, which this proposal doesn't have.
iawia002 updated PR #8970.
iawia002 edited PR #8970:
Part of #8929
This patch adds two new flags:
-S runtime-config[=y|n] -- Enable support for WASI runtime config API (experimental) -S runtime-config-var=<name>=<val> -- Pass a wasi runtime config variable to the program.
Separating these two flags is considered to handle the scenario where the
wasi-runtime-config
API is enabled but no configuration needs to be passed.To use the
wasi-runtime-config
API inwasmtime-cli
:
- Enable
wasi-runtime-config
API support by-Sruntime-config
:wasmtime run/serve -Sruntime-config ...
- Pass custom runtime configs to the component:
wasmtime run/serve -Sruntime-config -Sruntime-config-var=key1=value1 -Sruntime-config-var=key2=value2 ...
cc @alexcrichton
iawia002 commented on PR #8970:
All comments addressed, PTAL
alexcrichton submitted PR review.
alexcrichton merged PR #8970.
Last updated: Nov 22 2024 at 17:03 UTC