Skip to content

Commit

Permalink
feat(syswall): Adding syswall, rand and time capability to wazero
Browse files Browse the repository at this point in the history
  • Loading branch information
ritesh089 committed Sep 29, 2023
1 parent 83499bd commit e6a4fe0
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 e6a4fe0

Please sign in to comment.