mirror of
https://github.com/logos-storage/constantine.git
synced 2026-01-02 13:13:07 +00:00
* first jab at Rust bindings * stash C library and header generation * Create a single big library with multiple headers * remove ctt_pure, people will not call crypto proc twice with unchanged parameter and extra noise when reading header * fix MacOS and Windows builds * fix cross-lang ThinLTO, require LLD * Remove NimMain need, cleanup CPU features and detect them on library load
15 lines
216 B
Rust
15 lines
216 B
Rust
pub fn add(left: usize, right: usize) -> usize {
|
|
left + right
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
#[test]
|
|
fn it_works() {
|
|
let result = add(2, 2);
|
|
assert_eq!(result, 4);
|
|
}
|
|
}
|