Skip to content

Commit

Permalink
feat(syswall): Adding syswall capability to wazero
Browse files Browse the repository at this point in the history
  • Loading branch information
ritesh089 committed Sep 28, 2023
1 parent 83499bd commit 73e8df7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ type (
Stdout io.Writer
// Stderr is the writer WASI uses for `fd_write` to file descriptor 2.
Stderr io.Writer
// Use System Walltime
UseSysWalltime bool
}

// Module is a WebAssembly Module.
Expand Down
3 changes: 3 additions & 0 deletions engines/wazero/wazero.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ func (e *engine) New(ctx context.Context, host wapc.HostCallHandler, guest []byt
if config.Stderr != nil {
m.config = m.config.WithStderr(config.Stderr)
}
if config.UseSysWalltime {
m.config = m.config.WithSysWalltime()
}
mod = m

if _, err = instantiateWapcHost(ctx, r, m.wapcHostCallHandler, config.Logger); err != nil {
Expand Down

0 comments on commit 73e8df7

Please sign in to comment.