1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
// C doesn't follow rust rules for naming
// so we don't want to warn here
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
// Pull in the bindings file created during the initial build
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
/**
* Add more tests to gain more confidence in the bindings
*/
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn init_wolfssl() {
unsafe {
let res = wolfSSL_Init();
println!("Res: {:?}", res);
if res == WOLFSSL_SUCCESS {
println!("OK!");
}
}
}
}