Stream: git-wasmtime

Topic: wasmtime / PR #6652 preview2: refactor WasiCtxBuilder imp...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 19:23):

pchickey opened PR #6652 from bytecodealliance:pch/one_way_to_create_builder to bytecodealliance:main:

The optional-fields WasiCtxBuilder was an intermediate stepping stone which has outlived its usefulness - there is now only one sensible default value for each field, so we no longer need to expose the Default (empty) constructor.

There is no need for the WasiCtx::builder method being an alias for default, and it creates user confusion.

Finally, the WasiCtx itself is a private implementation detail for use in this crate only. The WasiCtxBuilder is the only way to customize its contents. We don't want to let users modify the fields of WasiCtx after it has been used by a wasm guest, because the guest may have made assumptions that fields won't change - e.g. the stderr field is fetched once by the adapter and assumed to always be the same, environment variables are copied into libc once and assumed to always be the same.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 19:24):

pchickey has marked PR #6652 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 19:24):

pchickey requested itsrainy for a review on PR #6652.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 19:24):

pchickey requested wasmtime-core-reviewers for a review on PR #6652.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 19:24):

pchickey requested alexcrichton for a review on PR #6652.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 19:31):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 19:31):

alexcrichton has enabled auto merge for PR #6652.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 20:49):

pchickey updated PR #6652.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 22:01):

alexcrichton merged PR #6652.


Last updated: Oct 23 2024 at 20:03 UTC