Skip to content

Instantly share code, notes, and snippets.

@auroranockert
Last active December 23, 2015 16:59
Show Gist options
  • Save auroranockert/6665213 to your computer and use it in GitHub Desktop.
Save auroranockert/6665213 to your computer and use it in GitHub Desktop.
No error anymore…
llvm!(extern {
fn add(a:i8, b:i8) -> i8 {
"%result = add i8 %arg0, %arg1
ret i8 %result"
}
})
#[fixed_stack_segment]
fn main() {
printfln!("Sum 2 + 8 is: %?", unsafe { add(2, 8) });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment