Stream: git-wasmtime

Topic: wasmtime / PR #8970 Integrate wasi-runtime-config into wa...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 07:55):

iawia002 requested elliottt for a review on PR #8970.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 07:55):

iawia002 requested wasmtime-core-reviewers for a review on PR #8970.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 07:55):

iawia002 requested wasmtime-default-reviewers for a review on PR #8970.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 07:55):

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 in wasmtime-cli:

  1. Build Wasmtime with wasi-runtime-config feature:
cargo build --features wasi-runtime-config
  1. Enable wasi-runtime-config API support by -Sruntime-config:
wasmtime run/serve -Sruntime-config ...
  1. Pass custom runtime configs to the component:
wasmtime run/serve -Sruntime-config -Sruntime-config-var=key1=value1 -Sruntime-config-var=key2=value2 ...

cc @alexcrichton

view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 14:54):

alexcrichton submitted PR review:

Thanks for this!

view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 14:54):

alexcrichton submitted PR review:

Thanks for this!

view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 14:54):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 18 2024 at 14:54):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2024 at 01:11):

iawia002 updated PR #8970.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2024 at 01:12):

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 in wasmtime-cli:

  1. Enable wasi-runtime-config API support by -Sruntime-config:
wasmtime run/serve -Sruntime-config ...
  1. Pass custom runtime configs to the component:
wasmtime run/serve -Sruntime-config -Sruntime-config-var=key1=value1 -Sruntime-config-var=key2=value2 ...

cc @alexcrichton

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2024 at 01:13):

iawia002 commented on PR #8970:

All comments addressed, PTAL

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2024 at 14:35):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 19 2024 at 14:49):

alexcrichton merged PR #8970.


Last updated: Nov 22 2024 at 17:03 UTC