Skip to content

Instantly share code, notes, and snippets.

@Hywan
Created May 12, 2020 09:17
Show Gist options
  • Save Hywan/a45f55f13f3be563f5cf95a0bb11f14c to your computer and use it in GitHub Desktop.
Save Hywan/a45f55f13f3be563f5cf95a0bb11f14c to your computer and use it in GitHub Desktop.
Simple Rust program that will compile to WebAssembly to be executed in Java
#[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