Skip to content
Permalink
Browse files

Add syscall/js (#908)

This PR adds a new package `syscall/js`. Originally `syscall/js` is for WebAssembly, but in GopherJS
this package works as a wrapper of `github.com/gopherjs/gopherjs/js`. With this package,
developers can use `syscall/js` both for GopherJS and WebAssembly.

The implementation is basically same as `github.com/gohperjs/gopherwasm`.

Fixes #899
  • Loading branch information...
hajimehoshi committed Apr 30, 2019
1 parent bd77b11 commit de1776fa8f11f4da15668ae71835ed702b8bcff9
@@ -139,6 +139,9 @@ func importWithSrcDir(bctx build.Context, path string, srcDir string, mode build
if installSuffix != "" {
bctx.InstallSuffix += "_" + installSuffix
}
case "syscall/js":
// There are no buildable files in this package, but we need to use files in the virtual directory.
mode |= build.FindOnly
case "math/big":
// Use pure Go version of math/big; we don't want non-Go assembly versions.
bctx.BuildTags = append(bctx.BuildTags, "math_big_pure_go")

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit de1776f

Please sign in to comment.
You can’t perform that action at this time.