aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/crypto
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2024-07-02 07:02:03 -0700
committerGitHub <[email protected]>2024-07-02 07:02:03 -0700
commit9cb263479c4b98f2d28889ca1acc297454e0d875 (patch)
treea30bcf8ef9086c5b8edfcee3b42bef352f396878 /src/crypto
parentf18c6e342f834988caf43fd652b2baae9c3093f0 (diff)
downloadtinygo-9cb263479c4b98f2d28889ca1acc297454e0d875.tar.gz
tinygo-9cb263479c4b98f2d28889ca1acc297454e0d875.zip
wasi preview 2 support (#4027)
* all: wasip2 support Co-authored-by: Randy Reddig <[email protected]>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/rand/rand_arc4random.go2
-rw-r--r--src/crypto/rand/rand_urandom.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/rand/rand_arc4random.go b/src/crypto/rand/rand_arc4random.go
index 1b1796b4d..64a6218bd 100644
--- a/src/crypto/rand/rand_arc4random.go
+++ b/src/crypto/rand/rand_arc4random.go
@@ -1,4 +1,4 @@
-//go:build darwin || tinygo.wasm
+//go:build darwin || wasip1 || wasip2 || wasm
// This implementation of crypto/rand uses the arc4random_buf function
// (available on both MacOS and WASI) to generate random numbers.
diff --git a/src/crypto/rand/rand_urandom.go b/src/crypto/rand/rand_urandom.go
index e9a8d485e..53554529b 100644
--- a/src/crypto/rand/rand_urandom.go
+++ b/src/crypto/rand/rand_urandom.go
@@ -1,4 +1,4 @@
-//go:build linux && !baremetal && !wasip1
+//go:build linux && !baremetal && !wasip1 && !wasip2
// This implementation of crypto/rand uses the /dev/urandom pseudo-file to
// generate random numbers.