mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
wasm: use WASI ABI for exit function
This improves compatibility between the regular browser target
(-target=wasm) and the WASI target (-target=wasi). Specifically, it
allows running WASI tests like this:
tinygo test -target=wasi encoding/base32
This commit is contained in:
committed by
Ron Evans
parent
f145663464
commit
6dd5666ed1
Vendored
+3
@@ -19,4 +19,7 @@ func main() {
|
||||
// package strings
|
||||
fmt.Println("strings.IndexByte:", strings.IndexByte("asdf", 'd'))
|
||||
fmt.Println("strings.Replace:", strings.Replace("An example string", " ", "-", -1))
|
||||
|
||||
// Exit the program normally.
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user