Skip to content

Commit

Permalink
Support building with Tinygo and target wasi
Browse files Browse the repository at this point in the history
Enable building using the tinygo compiler, together with
the `wasi` target.

This combination requires different handling compared to go >= 1.21
and the `wasip1` target. That's because Tinygo compiles using the
GOOS set to `linux` and the `GOARCH` set to `wasi`.

Signed-off-by: Flavio Castelli <[email protected]>
  • Loading branch information
flavio committed Jun 6, 2023
1 parent 7165f5e commit 032a334
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terminal_check_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//go:build (linux || aix || zos) && !js && !wasi
// +build linux aix zos
// +build !js
// +build !wasi

package logrus

Expand Down
8 changes: 8 additions & 0 deletions terminal_check_wasi.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build wasi
// +build wasi

package logrus

func isTerminal(fd int) bool {
return false
}

0 comments on commit 032a334

Please sign in to comment.