Visitar URL original
wasm/hello/ReadMe.md at master · feixiao/wasm · GitHub
Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 270 Bytes

ReadMe.md

File metadata and controls

18 lines (12 loc) · 270 Bytes

编译并运行一个简单的程序

mkdir hello

// hello.c
#include <stdio.h>

int main(int argc, char ** argv) { 
    printf("Hello, world!\n");
}


emcc hello.c -s WASM=1 -o hello.html

emrun --no_browser --port 8080 .

# 浏览访问localhost:8080