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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
pchickey has marked PR #6652 as ready for review.
pchickey requested itsrainy for a review on PR #6652.
pchickey requested wasmtime-core-reviewers for a review on PR #6652.
pchickey requested alexcrichton for a review on PR #6652.
alexcrichton submitted PR review.
alexcrichton has enabled auto merge for PR #6652.
pchickey updated PR #6652.
alexcrichton merged PR #6652.
Last updated: Nov 22 2024 at 16:03 UTC