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 thatset_clocks
could overrideset_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.
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?
rylev commented on issue #6669:
@pchickey I've renamed the traits. Unfortunately, the compiler seems to require the
Send
andSync
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)>`
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.
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).
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: Dec 23 2024 at 12:05 UTC