Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Clojure-flavored WASM’s text format
Clojure WebAssembly
Clojure-flavored WASM’s text format
Turns this
(module (defnadd[^i32 a ^i32 b] (let[x1] (if(=ax) (ax) (ab)))) (defnmain[] (add9(8) )) )
into this
(module (type $ return_add) func (param $ ai 32) (param $ bi 32) (result i 32))) (func $ add (param $ ai 32) (param $ bi 32) (result i 32) (local $ xi 32) (block (result i 32) (local.set $ x (i 32 .cont (1) )) (if(result i 32) (i 32.EQ (local.get $ x) (local.get $ a)) (then (i 32 (local.get $ x) (local.get $ a))) (else (i 32 (local.get $ b) (local.get $ a)))))) (export"add"( func $ add)) (type $ return_main) func (result i 32))) (func $ main (result i 32) (call $ add (i Const9) (i Const8))) (export"main"( func $ main)))
GIPHY App Key not set. Please check settings