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:
Ayke van Laethem
2021-07-31 15:10:18 +02:00
committed by Ron Evans
parent ab47cea055
commit 478c592b13
7 changed files with 37 additions and 26 deletions
+7 -1
View File
@@ -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.