feature gated ffi deps and CRC support

master
Avril 4 years ago
parent 1786ca4f88
commit 38f2696270
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -13,7 +13,7 @@ crate-type = ["rlib", "cdylib", "staticlib"]
[features]
default = ["ffi", "crc"]
ffi = ["malloc-array"]
ffi = ["libc", "malloc-array"]
[profile.release]
opt-level = 3
@ -24,7 +24,7 @@ panic = "unwind"
[dependencies]
sha2 = "0.9"
malloc-array = {version = "1.4", optional=true}
libc = "0.2"
libc = {version = "0.2", optional=true}
crc = {version = "1.8", optional=true}
hex-literal = "0.2"
getrandom = "0.1"

@ -237,6 +237,7 @@ pub fn generate<T: AsRef<[u8]>>(context: &ctx::Context, bytes: T) -> Result<Stri
}
use std::ffi::c_void;
#[cfg(feature="ffi")]
use libc::{
size_t,
c_char,

Loading…
Cancel
Save