Skip to content

Instantly share code, notes, and snippets.

@Hywan
Created August 28, 2019 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hywan/f94260e93d32b7426c05475b13428f1a to your computer and use it in GitHub Desktop.
Save Hywan/f94260e93d32b7426c05475b13428f1a to your computer and use it in GitHub Desktop.
Simple Rust program that compiles to WebAssembly
#[no_mangle]
pub extern fn sum(x: i32, y: i32) -> i32 {
x + y
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment