forked from Mirrors/wasm3
parent
4482e2bd9b
commit
b6df111cfd
@ -0,0 +1,15 @@
|
|||||||
|
## Compile
|
||||||
|
|
||||||
|
```sh
|
||||||
|
wasicc -Oz wasi_printf.c -o wasi_printf.wasm
|
||||||
|
|
||||||
|
# Disassemble:
|
||||||
|
wasm2wat wasi_printf.wasm -o wasi_printf.wat
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run
|
||||||
|
|
||||||
|
```sh
|
||||||
|
../../build/wasm3 wasi_printf.wasm _start
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int args, char* argv[]) {
|
||||||
|
//puts("Hello world!");
|
||||||
|
printf("Hell%x w%d%s!\n", 0, 0, "rld");
|
||||||
|
return 0;
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in new issue