Created
February 11, 2020 22:49
-
-
Save JeremyLikness/8a96cc75c90cb453cb7deeeab62f6081 to your computer and use it in GitHub Desktop.
WASI "Hello, World"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(type $t0 (func (param i32 i32 i32 i32) (result i32))) | |
(type $t1 (func)) | |
(import "wasi_unstable" "fd_write" (func $fd_write (type $t0))) | |
(func $main (type $t1) | |
i32.const 0 | |
i32.const 8 | |
i32.store | |
i32.const 4 | |
i32.const 22 | |
i32.store | |
i32.const 1 | |
i32.const 0 | |
i32.const 1 | |
i32.const 30 | |
call $fd_write | |
drop | |
) | |
(memory $memory 1) | |
(export "memory" (memory 0)) | |
(export "_start" (func $main)) | |
(data (i32.const 8) "My first WASI module!\0a") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment