mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-08 05:51:17 -07:00
integrate with mac build system and add skeleton
This commit is contained in:
parent
271dfc0d2b
commit
c689c0bd8c
3 changed files with 29 additions and 13 deletions
|
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue