Stream: git-wasmtime

Topic: wasmtime / issue #6576 Current `preview2::WasiCtx::builde...


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

Hpmason opened issue #6576:

wasmtime_wasi::preview2::WasiCtx::builder returns the default WasiCtxBuilder, but there's no way to set random, which is a required field to builder WasiCtx. The derived Default impl sets random to None, so there is no way to successfully build WasiCtx from WasiCtx::builder.

WasiCtx::builder:
https://github.com/bytecodealliance/wasmtime/blob/aef1f57d130e359565dbc50090d031b398bac1c2/crates/wasi/src/preview2/ctx.rs#L203-L205

random required here:
https://github.com/bytecodealliance/wasmtime/blob/aef1f57d130e359565dbc50090d031b398bac1c2/crates/wasi/src/preview2/ctx.rs#L162-L177

Version

This seems to affect version 10.0.0 up to the current main branch

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

Hpmason labeled issue #6576:

wasmtime_wasi::preview2::WasiCtx::builder returns the default WasiCtxBuilder, but there's no way to set random, which is a required field to builder WasiCtx. The derived Default impl sets random to None, so there is no way to successfully build WasiCtx from WasiCtx::builder.

WasiCtx::builder:
https://github.com/bytecodealliance/wasmtime/blob/aef1f57d130e359565dbc50090d031b398bac1c2/crates/wasi/src/preview2/ctx.rs#L203-L205

random required here:
https://github.com/bytecodealliance/wasmtime/blob/aef1f57d130e359565dbc50090d031b398bac1c2/crates/wasi/src/preview2/ctx.rs#L162-L177

Version

This seems to affect version 10.0.0 up to the current main branch

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

sunfishcode commented on issue #6576:

Thanks for the report! I've now submitted https://github.com/bytecodealliance/wasmtime/pull/6596 to add a set_random function for initializing the random state.

A workaround for this is to call WasiCtxBuilder::new() instead of WasiCtx::builder().

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

pchickey commented on issue #6576:

Sorry, WasiCtx::builder() and WasiCtxBuilder::new() should be identical, but since I only used one of them in tests, the other one diverged.

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

pchickey edited a comment on issue #6576:

Sorry, WasiCtx::builder() and WasiCtxBuilder::new() should be identical, but since I only used one of them in tests, the other one diverged. Will fix.

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

sunfishcode closed issue #6576:

wasmtime_wasi::preview2::WasiCtx::builder returns the default WasiCtxBuilder, but there's no way to set random, which is a required field to builder WasiCtx. The derived Default impl sets random to None, so there is no way to successfully build WasiCtx from WasiCtx::builder.

WasiCtx::builder:
https://github.com/bytecodealliance/wasmtime/blob/aef1f57d130e359565dbc50090d031b398bac1c2/crates/wasi/src/preview2/ctx.rs#L203-L205

random required here:
https://github.com/bytecodealliance/wasmtime/blob/aef1f57d130e359565dbc50090d031b398bac1c2/crates/wasi/src/preview2/ctx.rs#L162-L177

Version

This seems to affect version 10.0.0 up to the current main branch


Last updated: Nov 22 2024 at 17:03 UTC