Skip to content

Commit

Permalink
feat(syswall): Adding syswall, rand and time capability to wazero (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: rrai35 <ritesh.rai@aexp.com>
  • Loading branch information
ritesh089 and ritesh089 authored Sep 29, 2023
1 parent 83499bd commit 89be944
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engines/wazero/wazero.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package wazero

import (
"context"
"crypto/rand"
"errors"
"fmt"
"sync/atomic"
Expand Down Expand Up @@ -132,6 +133,8 @@ func (e *engine) New(ctx context.Context, host wapc.HostCallHandler, guest []byt
if config.Stderr != nil {
m.config = m.config.WithStderr(config.Stderr)
}
m.config = m.config.WithRandSource(rand.Reader).WithSysNanosleep().WithSysNanotime().WithSysWalltime()

mod = m

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

0 comments on commit 89be944

Please sign in to comment.