Skip to content

Instantly share code, notes, and snippets.

@lqd
Created June 20, 2016 21:32
Show Gist options
  • Save lqd/cdce63fbbaa6833d9f5040ac95ddc451 to your computer and use it in GitHub Desktop.
Save lqd/cdce63fbbaa6833d9f5040ac95ddc451 to your computer and use it in GitHub Desktop.
binaryen-shell ./wast/div.wast == Abort trap: 6
(module
(memory 0)
(type $rustfn-0-47 (func))
(func $test (type $rustfn-0-47)
(block
(call_import $print_i32
(i32.div
(i32.const 4)
(i32.const 2)
)
)
(return
(i32.const 1)
)
)
)
(import $print_i32 "spectest" "print" (param i32))
(export "rust_fn" $test)
)
(invoke "rust_fn")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment