diff options
| author | Yuval Adam <_@yuv.al> | 2019-03-18 16:54:52 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2019-03-18 16:54:52 +0200 |
| commit | 4e5cac1c627648fd8ade50024490d541d0c6bf93 (patch) | |
| tree | 5a7b1e7f781ab52706d9584f00f780f52823e79f | |
| parent | 82388514aa38f632738e60337712dc036fc3dbb8 (diff) | |
Initial ffi calls not working
| -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(); } } |
