7 changed files with 0 additions and 41 deletions
@ -1,5 +0,0 @@
|
||||
# This file is automatically @generated by Cargo. |
||||
# It is not intended for manual editing. |
||||
[[package]] |
||||
name = "binding-example" |
||||
version = "0.1.0" |
||||
@ -1,10 +0,0 @@
|
||||
[package] |
||||
name = "binding-example" |
||||
version = "0.1.0" |
||||
authors = ["Joseph Henry <joseph.henry@zerotier.com>"] |
||||
edition = "2018" |
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
||||
#rustc-link-search = ["../../../lib/debug/macos-x86_64/"] |
||||
|
||||
[dependencies] |
||||
@ -1,4 +0,0 @@
|
||||
fn main() { |
||||
println!("cargo:rustc-flags=-l dylib=c++"); |
||||
//println!("cargo:rustc-link-search=.");
|
||||
} |
||||
@ -1,10 +0,0 @@
|
||||
|
||||
#[link(name = "libzt", kind = "dylib")] |
||||
extern { |
||||
fn zts_socket(address_family: i32) -> i32; |
||||
} |
||||
|
||||
fn main() { |
||||
let x = unsafe { zts_socket(100) }; |
||||
println!("zts_socket() = {}", x); |
||||
} |
||||
@ -1,6 +0,0 @@
|
||||
#include <stdio.h> |
||||
|
||||
int zts_socket(int address_family) |
||||
{ |
||||
return -777; |
||||
} |
||||
Loading…
Reference in new issue