diff options
| author | Yuval Adam <_@yuv.al> | 2019-03-18 14:16:49 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2019-03-18 14:20:57 +0200 |
| commit | 77614da6736185a50b71713e4e0b3f7a7c4e840b (patch) | |
| tree | bd74ab84f37d6c2485fae3a36082f6407b025194 | |
| parent | 2cda7faab3eab847947d5da85202d1fb7bfbc766 (diff) | |
Initial version of bchlib-sys
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | Cargo.toml | 6 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | build.rs | 4 | ||||
| -rw-r--r-- | src/bch/bch | bin | 22976 -> 0 bytes | |||
| -rw-r--r-- | src/lib.rs | 6 |
6 files changed, 15 insertions, 8 deletions
@@ -1,3 +1,4 @@ +/src/bch/bch /target **/*.rs.bk @@ -7,4 +8,4 @@ #/target #**/*.rs.bk -Cargo.lock
\ No newline at end of file +Cargo.lock @@ -1,8 +1,12 @@ [package] -name = "bchlib" +name = "bchlib-sys" version = "0.1.0" authors = ["Yuval Adam <_@yuv.al>"] edition = "2018" +description = "Low-level Rust bindings for BCH encoding/decoding library, based on the bch_codec fork" +license = "GPL-2.0" +license-file = "LICENSE.md" +repository = "https://github.com/yuvadm/bchlib-sys" [build-dependencies] bindgen = "0.42.2" @@ -1,6 +1,6 @@ -# bchlib +# bchlib-sys -Rust bindings for BCH encoding/decoding library, based on the [bch_codec](https://github.com/mborgerding/bch_codec) fork. +Low-level Rust bindings for BCH encoding/decoding library, based on the [bch_codec](https://github.com/mborgerding/bch_codec) fork. ## Build @@ -5,9 +5,7 @@ use std::env; use std::path::PathBuf; fn main() { - cc::Build::new().file("src/bch/bch.c"); - - println!("cargo:rustc-link-lib=bch"); + cc::Build::new().file("src/bch/bch.c").compile("bch"); let bindings = bindgen::Builder::default() .header("src/bch/bch.h") diff --git a/src/bch/bch b/src/bch/bch Binary files differdeleted file mode 100644 index 5b438cd..0000000 --- a/src/bch/bch +++ /dev/null @@ -6,8 +6,12 @@ include!(concat!(env!("OUT_DIR"), "/bindings.rs")); #[cfg(test)] mod tests { + use super::*; + #[test] fn it_works() { - assert_eq!(2 + 2, 4); + unsafe { + let _c = init_bch(5, 2, 37); + } } } |
