Hpmason opened issue #6576:
wasmtime_wasi::preview2::WasiCtx::builder
returns the defaultWasiCtxBuilder
, but there's no way to setrandom
, which is a required field to builderWasiCtx
. The derived Default impl setsrandom
to None, so there is no way to successfully buildWasiCtx
fromWasiCtx::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-L177Version
This seems to affect version 10.0.0 up to the current main branch
Hpmason labeled issue #6576:
wasmtime_wasi::preview2::WasiCtx::builder
returns the defaultWasiCtxBuilder
, but there's no way to setrandom
, which is a required field to builderWasiCtx
. The derived Default impl setsrandom
to None, so there is no way to successfully buildWasiCtx
fromWasiCtx::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-L177Version
This seems to affect version 10.0.0 up to the current main branch
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 ofWasiCtx::builder()
.
pchickey commented on issue #6576:
Sorry,
WasiCtx::builder()
andWasiCtxBuilder::new()
should be identical, but since I only used one of them in tests, the other one diverged.
pchickey edited a comment on issue #6576:
Sorry,
WasiCtx::builder()
andWasiCtxBuilder::new()
should be identical, but since I only used one of them in tests, the other one diverged. Will fix.
sunfishcode closed issue #6576:
wasmtime_wasi::preview2::WasiCtx::builder
returns the defaultWasiCtxBuilder
, but there's no way to setrandom
, which is a required field to builderWasiCtx
. The derived Default impl setsrandom
to None, so there is no way to successfully buildWasiCtx
fromWasiCtx::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-L177Version
This seems to affect version 10.0.0 up to the current main branch
Last updated: Nov 22 2024 at 17:03 UTC