mirror of
https://github.com/golang/go
synced 2024-11-24 04:00:13 -07:00
680caf1535
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>
15 lines
446 B
Bash
Executable File
15 lines
446 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright 2018 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
SOURCE="${BASH_SOURCE[0]}"
|
|
while [ -h "$SOURCE" ]; do
|
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|
SOURCE="$(readlink "$SOURCE")"
|
|
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
|
done
|
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|
|
|
exec node "$DIR/wasm_exec_node.js" "$@"
|