thomscoder / luna

🌙 A really tiny WebAssembly compiler for demonstration and educational purposes. Written in Go and built as one of my quests to conquer the WebAssembly dungeon

Home Page:https://luna-demo.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add multi value

thomscoder opened this issue · comments

Now that Luna supports subtractions and addition, should be able to call different functions like this

(module
  (func $subtractNumbers (param i32 i32) (result i32)
    local.get 1
    local.get 0
  	i32.sub
  )

  (func (export "addNumbers") (param i32 i32 i32) (result i32)
    local.get 0
    local.get 1
    call $subtractNumbers
    local.get 2
    i32.add))