1
0
mirror of https://github.com/golang/go synced 2024-09-28 21:34:30 -06:00
Commit Graph

3 Commits

Author SHA1 Message Date
Johan Brandhorst-Satzkorn
3875258f97 misc/wasm: use NodeJS crypto library
The move to NodeJS 18 allows us to replace the custom
crypto functions with the expanded crypto primitives of
the NodeJS crypto library.

Fixes #56860

Change-Id: I8726b4003150f31521f246f613b6976641b9fa69
Reviewed-on: https://go-review.googlesource.com/c/go/+/463975
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Evan Phoenix <evan@phx.io>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-01-30 18:49:42 +00:00
Johan Brandhorst-Satzkorn
6ab721dfd6 misc/wasm: use NodeJS performance library
The upgrade to NodeJS 18 introduces various library
updates that mean we can no longer override the global
performance package. Instead, rely on the performance
library provided by the NodeJS runtime.

Fixes #57516

Change-Id: Ic8ed902c696ad154f676e0b74b42efb84f02f8db
Reviewed-on: https://go-review.googlesource.com/c/go/+/463234
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Evan Phoenix <evan@phx.io>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-01-30 18:49:10 +00:00
Richard Musiol
680caf1535 misc/wasm: expect environment to provide polyfills
The list of environments to support with wasm_exec.js was becoming too
large to maintain. With this change, wasm_exec.js expects that the
environment provides all necessary polyfills.

The standardized "globalThis" is used for accessing the environment.
wasm_exec.js now only provides stub fallbacks for globalThis.fs and
globalThis.process.

All code specific to Node.js is now in a separate file.

Change-Id: I076febbd94d4d7845260faad972f450f74a7b983
Reviewed-on: https://go-review.googlesource.com/c/go/+/347353
Trust: Richard Musiol <neelance@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-10-16 14:50:21 +00:00