rylev opened PR #6669 from rylev:clock-setters
to bytecodealliance:main
:
This allows users to set individual clock types on the
WasiCtxBuilder
.Before
let mut clocks = clocks_ctx(); clocks.wall = Box::new(MyWallClock); builder.set_clocks(clocks)
After
builder.set_wall_clock(MyWallClock)
I didn't add any documentation because most of the other setters don't have any, and I was unsure what form the documentation should take.
rylev requested alexcrichton for a review on PR #6669.
rylev requested wasmtime-core-reviewers for a review on PR #6669.
rylev updated PR #6669.
alexcrichton submitted PR review.
pchickey submitted PR review:
Looks good - thank you. One last suggestion if you're up to it - in the past I used the convention
WasiThing
to name the host types, but as we shifted to the component model, I've preferredHostThing
instead - would you mind renaming theseHostMonotonicClock
andHostWallClock
?Also I'm not sure if the +Send+Sync in each box is required since those traits already require send and sync, maybe those could have been removed a while ago...
rylev updated PR #6669.
rylev updated PR #6669.
alexcrichton merged PR #6669.
Last updated: Nov 22 2024 at 17:03 UTC