diff --git a/fcntl/.gitignore b/.gitignore similarity index 100% rename from fcntl/.gitignore rename to .gitignore diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000000..7589f6fe81 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "relibc" +version = "0.1.0" +authors = ["Jeremy Soller "] + +[lib] +name = "c" +crate-type = ["staticlib"] + +[workspace] +members = [ + "fcntl", + "unistd" +] + +[dependencies] +fcntl = { path = "fcntl" } +unistd = { path = "unistd" } diff --git a/fcntl/Cargo.toml b/fcntl/Cargo.toml index fa3f01a67c..1403647b70 100644 --- a/fcntl/Cargo.toml +++ b/fcntl/Cargo.toml @@ -2,6 +2,7 @@ name = "fcntl" version = "0.1.0" authors = ["Jeremy Soller "] +build = "build.rs" [build-dependencies] cbindgen = "0.5" diff --git a/fcntl/build.rs b/fcntl/build.rs index 34ef21a705..fc96c5a7b1 100644 --- a/fcntl/build.rs +++ b/fcntl/build.rs @@ -7,5 +7,5 @@ fn main() { cbindgen::generate(crate_dir) .expect("Unable to generate bindings") - .write_to_file("target/fcntl.h"); + .write_to_file("../target/fcntl.h"); } diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000000..866bc824b8 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,5 @@ +extern crate fcntl; +extern crate unistd; + +pub use fcntl::*; +pub use unistd::*; diff --git a/unistd/.gitignore b/unistd/.gitignore deleted file mode 100644 index 042776aad7..0000000000 --- a/unistd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Cargo.lock -/target/ diff --git a/unistd/Cargo.toml b/unistd/Cargo.toml index e57a536766..08fece8fcc 100644 --- a/unistd/Cargo.toml +++ b/unistd/Cargo.toml @@ -2,6 +2,7 @@ name = "unistd" version = "0.1.0" authors = ["Jeremy Soller "] +build = "build.rs" [build-dependencies] cbindgen = "0.5" diff --git a/unistd/build.rs b/unistd/build.rs index 8ae3813ef8..6d467a9aa0 100644 --- a/unistd/build.rs +++ b/unistd/build.rs @@ -7,5 +7,5 @@ fn main() { cbindgen::generate(crate_dir) .expect("Unable to generate bindings") - .write_to_file("target/unistd.h"); + .write_to_file("../target/unistd.h"); }