mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
8 lines
124 B
Rust
8 lines
124 B
Rust
#[no_mangle]
|
|
pub extern "C" fn add(a: i32, b: i32) -> i32 {
|
|
a + b
|
|
}
|
|
|
|
// to compile:
|
|
// rustc --crate-type cdylib add.rs
|