diff options
author | Ayke van Laethem <[email protected]> | 2024-06-27 18:27:28 +0200 |
---|---|---|
committer | Ayke <[email protected]> | 2024-06-27 21:11:11 +0200 |
commit | fae0402fdeba8a7d3a2e9b97019aeef7e3fae930 (patch) | |
tree | 2d40a7b1339f764f02f51a8d530e7605a54d8d6a /src/examples | |
parent | 4517a0c17b207957f8c5506032c396f5f34950ba (diff) | |
download | tinygo-fae0402fdeba8a7d3a2e9b97019aeef7e3fae930.tar.gz tinygo-fae0402fdeba8a7d3a2e9b97019aeef7e3fae930.zip |
wasm-unknown: make sure the os package can be imported
See: https://github.com/tinygo-org/tinygo/issues/4314
The os package isn't particularly useful on wasm-unknown, but just like
on baremetal systems it's imported by a lot of packages so it should at
least be possible to import this package.
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/hello-wasm-unknown/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/examples/hello-wasm-unknown/main.go b/src/examples/hello-wasm-unknown/main.go index 557f4a3c3..ff2ec88f1 100644 --- a/src/examples/hello-wasm-unknown/main.go +++ b/src/examples/hello-wasm-unknown/main.go @@ -3,6 +3,10 @@ // tinygo build -size short -o hello-unknown.wasm -target wasm-unknown -gc=leaking -no-debug ./src/examples/hello-wasm-unknown/ package main +// Smoke test: make sure the fmt package can be imported (even if it isn't +// really useful for wasm-unknown). +import _ "os" + var x int32 //go:wasmimport hosted echo_i32 |