integrate with mac build system and add skeleton

This commit is contained in:
Grant Limberg 2021-10-27 17:09:01 -07:00
parent 271dfc0d2b
commit c689c0bd8c
No known key found for this signature in database
GPG key ID: 2BA62CCABBB4095A
3 changed files with 29 additions and 13 deletions

View file

@ -1,13 +1,22 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
#[repr(C)]
pub struct ZeroIDC {}
#[no_mangle]
pub extern "C" fn hello_rust() {
println!("Hello, Rust from C!")
pub extern "C" fn zeroidc_new() -> Box<ZeroIDC> {
Box::new(ZeroIDC{})
}
#[no_mangle]
pub extern "C" fn zeroidc_delete(_: Option<Box<ZeroIDC>>) {}
#[no_mangle]
pub extern "C" fn zeroidc_start(idc: &mut ZeroIDC) {
}
#[no_mangle]
pub extern "C" fn zeroidc_stop(idc: &mut ZeroIDC) {
}