@ -13,3 +13,6 @@ libc = "0.2.76"
[build-dependencies]
rustc_version = "0.2"
[lib]
crate-type = ["staticlib", "cdylib"]
@ -21,4 +21,9 @@ fn main() {
println!("cargo:rustc-cfg=dev");
}
// Link to GHOST and required stuffs
println!(r"cargo:rustc-link-search=./lib");
println!("cargo:rustc-link-lib=dylib=stdc++"); // libstdc++
@ -11,6 +11,7 @@ use std::{
ptr::NonNull,
};
#[link(name="bf_intern_ghost")]
extern "C" {
pub fn GHOST_CreateSystem() -> GHOST_SystemHandle;
pub fn GHOST_SystemInitDebug(_: GHOST_SystemHandle, _: c_int);
@ -79,7 +79,10 @@ mod tests {
use super::*;
#[test]
fn it_works() {
// nothing yet.
unsafe {
let ptr = api::GHOST_CreateSystem();
assert!(!ptr.is_null());
macro_rules! static_assert {