Add Swift to Rust example.

This commit is contained in:
Calvin Hill
2019-01-07 09:11:54 +00:00
parent 0ab5fe120e
commit e51997184e
5 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1 @@
int double_input(int input);

4
swift-to-rust/src/lib.rs Normal file
View File

@@ -0,0 +1,4 @@
#[no_mangle]
pub extern fn double_input(input: i32) -> i32 {
input * 2
}

View File

@@ -0,0 +1 @@
print(double_input(2))