diff options
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rw-r--r-- | src/lib.rs | 12 |
2 files changed, 12 insertions, 1 deletions
@@ -5,3 +5,4 @@ authors = ["Yuval Adam <_@yuv.al>"] edition = "2018" [dependencies] +bchlib-sys = "0.1.0" @@ -1,7 +1,17 @@ +extern crate bchlib_sys as ffi; + +pub fn init(m:i32, t:i32, poly: u32) { + unsafe { + let bch = ffi::init_bch(m, t, poly); + } +} + #[cfg(test)] mod tests { + use super::*; + #[test] fn it_works() { - assert_eq!(2 + 2, 4); + init(); } } |
