Stream: git-wasmtime

Topic: wasmtime / issue #6669 Add `WasiCtxBuilder` setters for t...


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

alexcrichton commented on issue #6669:

Could this perhaps remove the set_clocks configuration method as well? I think it could otherwise be a bit surprising that set_clocks could override set_monotonic_clock for example, but if it doesn't exist then configuration should still be possible and there shouldn't be odd interactions between methods in theory.

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

pchickey commented on issue #6669:

We should drop the WasiClocks intermediate struct entirely and just have two members of WasiCtx for the wall and monotonic clock - would you be willing to do that?

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

rylev commented on issue #6669:

@pchickey I've renamed the traits. Unfortunately, the compiler seems to require the Send and Sync bounds. I was surprised by this as well...

error[E0308]: mismatched types
  --> crates/wasi/src/preview2/ctx.rs:50:30
   |
50 |             monotonic_clock: monotonic_clock(),
   |                              ^^^^^^^^^^^^^^^^^ expected trait `HostMonotonicClock + std::marker::Send + Sync`, found trait `HostMonotonicClock`
   |
   = note: expected struct `Box<(dyn HostMonotonicClock + std::marker::Send + Sync + 'static)>`
              found struct `Box<(dyn HostMonotonicClock + 'static)>`

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

sunfishcode commented on issue #6669:

@rylev The PR here is good, but separately, I'm curious; would you mind saying a little more about what your use case looks like? I'm interested in learning about who's using non-default clocks and what they're using them for.

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

rylev commented on issue #6669:

@sunfishcode unfortunately it's not too interesting - just doing some testing around ABI conformance of wasm binaries built with old versions of wit-bindgen that have been adapted to run against the latest version of wasmtime. You can see the [code here(https://github.com/fermyon/spin-componentize/blob/d5caab107ca38a6e7adb0ff6c1cac94db73f7d36/abi-conformance/src/test_wasi.rs#L126-L138).

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

rylev edited a comment on issue #6669:

@sunfishcode unfortunately it's not too interesting - just doing some testing around ABI conformance of wasm binaries built with old versions of wit-bindgen that have been adapted to run against the latest version of wasmtime. You can see the code here.


Last updated: Nov 22 2024 at 16:03 UTC