Browse Source

Remove incomplete rust wrapper files

pull/8/head
Joseph Henry 5 years ago
parent
commit
842059aeef
No known key found for this signature in database
GPG Key ID: C45B33FF5EBC9344
  1. 5
      examples/rust/binding-example/Cargo.lock
  2. 10
      examples/rust/binding-example/Cargo.toml
  3. 4
      examples/rust/binding-example/build.rs
  4. 10
      examples/rust/binding-example/src/main.rs
  5. 6
      examples/rust/program.c
  6. 1
      examples/rust/program.h
  7. 5
      examples/rust/program.rs

5
examples/rust/binding-example/Cargo.lock generated

@ -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"

10
examples/rust/binding-example/Cargo.toml

@ -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]

4
examples/rust/binding-example/build.rs

@ -1,4 +0,0 @@
fn main() {
println!("cargo:rustc-flags=-l dylib=c++");
//println!("cargo:rustc-link-search=.");
}

10
examples/rust/binding-example/src/main.rs

@ -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);
}

6
examples/rust/program.c

@ -1,6 +0,0 @@
#include <stdio.h>
int zts_socket(int address_family)
{
return -777;
}

1
examples/rust/program.h

@ -1 +0,0 @@
int zts_socket(int address_family);

5
examples/rust/program.rs

@ -1,5 +0,0 @@
/* automatically generated by rust-bindgen 0.56.0 */
extern "C" {
pub fn zts_socket(address_family: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
Loading…
Cancel
Save