Stream: git-wasmtime

Topic: wasmtime / PR #6770 Change preview2 builder methods to us...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 14:36):

alexcrichton opened PR #6770 from alexcrichton:mut-builder to bytecodealliance:main:

This commit changes the WasiCtxBuilder for preview2 to use a builder pattern more similar to std::process::Command where methods take &mut self and return &mut Self instead of taking self and returning Self. This pattern enables more easily building up configuration over time throughout code where ownership transfer might otherwise be awkward.

A small caveat to this is that the ergonomics of this pattern only really work out well if the final "build" method takes &mut self as well. In this situation it's difficult to try to figure out what's supposed to happen if this method is called twice, so I left it to panic for now so we can more easily update it in the future possibly.

I'll also note that the original motivations for this come from the upgrade at https://github.com/fermyon/spin/pull/1678

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 14:36):

alexcrichton requested jameysharp for a review on PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 14:36):

alexcrichton requested wasmtime-core-reviewers for a review on PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 15:58):

pchickey requested pchickey for a review on PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2023 at 20:31):

alexcrichton closed without merge PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2023 at 15:58):

alexcrichton reopened PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2023 at 16:38):

alexcrichton updated PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2023 at 17:05):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 02 2023 at 10:12):

alexcrichton updated PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 02 2023 at 10:12):

alexcrichton has enabled auto merge for PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 04 2023 at 23:32):

alexcrichton updated PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 04 2023 at 23:32):

alexcrichton updated PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2023 at 15:30):

alexcrichton updated PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2023 at 15:30):

alexcrichton requested wasmtime-default-reviewers for a review on PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2023 at 15:31):

alexcrichton has enabled auto merge for PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2023 at 16:32):

alexcrichton updated PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2023 at 16:32):

alexcrichton has enabled auto merge for PR #6770.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2023 at 17:41):

alexcrichton merged PR #6770.


Last updated: Nov 22 2024 at 17:03 UTC