Add WebAssembly (#1058)

Co-authored-by: Richie Bendall <richiebendall@gmail.com>
This commit is contained in:
Po-Yi Tsai
2021-06-12 12:25:15 +08:00
committed by GitHub
parent 02d3bfb1aa
commit 95f392075f
2 changed files with 22 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ Thanks to everyone who continues to contribute; new languages are created every
Make sure to see [contributing.md](/contributing.md) for instructions on contributing to the project!
<!--Languages start-->
## Languages (778 total)
## Languages (780 total)
* [!@#$%^&*()_+](%23/%21%40%23%24%25%5E%26%E2%88%97%28%29_%2B)
* [05AB1E](%23/05AB1E)
@@ -278,6 +278,7 @@ Make sure to see [contributing.md](/contributing.md) for instructions on contrib
* [Divzeros](d/Divzeros.dz)
* [DNA#](d/DNA%23.dna)
* [DNA-Sharp](d/DNA-Sharp.dna)
* [DOG](d/DOG)
* [Dog](d/Dog)
* [DogeScript](d/DogeScript.djs)
* [DOGO](d/DOGO.dogo)
@@ -750,6 +751,7 @@ Make sure to see [contributing.md](/contributing.md) for instructions on contrib
* [Vowels](v/Vowels.vw)
* [VRML](v/VRML.wrl)
* [Vue](v/Vue.js)
* [WebAssembly](w/WebAssembly.wat)
* [Wenyan](w/Wenyan.wy)
* [Wheat](w/Wheat.wheat)
* [Whenever](w/Whenever.whenever)

19
w/WebAssembly.wat Normal file
View File

@@ -0,0 +1,19 @@
(module
(import "wasi_unstable" "fd_write"
(func $fd_write (param i32 i32 i32 i32) (result i32))
)
(memory 1)
(export "memory" (memory 0))
(data (i32.const 0) "\08\00\00\00\0c\00\00\00Hello World\n")
(func $main (export "_start")
i32.const 1
i32.const 0
i32.const 1
i32.const 20
call $fd_write
drop
)
)