Skip to content

Commit

Permalink
Support GOOS=wasip1 (#4045)
Browse files Browse the repository at this point in the history
**What type of PR is this?**

Feature

**What does this PR do? Why is it needed?**

Adds support for GOOS=wasip1 so that users can build wasi binaries using
rules_go

**Which issues(s) does this PR fix?**

Fixes #4046

**Other notes for review**

None
  • Loading branch information
rockwotj authored and tyler-french committed Aug 30, 2024
1 parent 9599402 commit 6583a73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions go/private/platforms.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ GOOS_GOARCH = (
("plan9", "amd64"),
("plan9", "arm"),
("solaris", "amd64"),
("wasip1", "wasm"),
("windows", "386"),
("windows", "amd64"),
("windows", "arm"),
Expand Down
3 changes: 2 additions & 1 deletion go/tools/internal/stdlib_tags/stdlib_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func isConstraint(line string) bool {
}

// Taken from
// https://github.com/golang/go/blob/3d5391ed87d813110e10b954c62bf7ed578b591f/src/go/build/syslist.go
// https://github.com/golang/go/blob/2693f77b3583585172810427e12a634b28d34493/src/internal/syslist/syslist.go
var knownOS = map[string]bool{
"aix": true,
"android": true,
Expand All @@ -142,6 +142,7 @@ var knownOS = map[string]bool{
"openbsd": true,
"plan9": true,
"solaris": true,
"wasip1": true,
"windows": true,
"zos": true,
}
Expand Down

0 comments on commit 6583a73

Please sign in to comment.