From e6a4fe0ce6f1b5960bb025a378a557656f4ec46e Mon Sep 17 00:00:00 2001 From: rrai35 Date: Fri, 29 Sep 2023 10:19:35 -0400 Subject: [PATCH] feat(syswall): Adding syswall, rand and time capability to wazero --- engines/wazero/wazero.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/wazero/wazero.go b/engines/wazero/wazero.go index 9d45da2..9f6b46d 100644 --- a/engines/wazero/wazero.go +++ b/engines/wazero/wazero.go @@ -2,6 +2,7 @@ package wazero import ( "context" + "crypto/rand" "errors" "fmt" "sync/atomic" @@ -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 {