mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
wasm: add support for the crypto/rand package
This is done via wasi-libc and the WASI interface, for ease of maintenance (only one implementation for both WASI and JS/browsers).
This commit is contained in:
committed by
Ron Evans
parent
ab47cea055
commit
478c592b13
+7
-1
@@ -162,7 +162,7 @@ func runPlatTests(target string, tests []string, t *testing.T) {
|
||||
runTest(name, target, t, nil, nil)
|
||||
})
|
||||
}
|
||||
if target == "wasi" || target == "" {
|
||||
if target == "" || target == "wasi" {
|
||||
t.Run("filesystem.go", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
runTest("filesystem.go", target, t, nil, nil)
|
||||
@@ -172,6 +172,12 @@ func runPlatTests(target string, tests []string, t *testing.T) {
|
||||
runTest("env.go", target, t, []string{"first", "second"}, []string{"ENV1=VALUE1", "ENV2=VALUE2"})
|
||||
})
|
||||
}
|
||||
if target == "" || target == "wasi" || target == "wasm" {
|
||||
t.Run("rand.go", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
runTest("rand.go", target, t, nil, nil)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Due to some problems with LLD, we cannot run links in parallel, or in parallel with compiles.
|
||||
|
||||
Reference in New Issue
Block a user