소스 검색

Add overarching staticlib

Jeremy Soller 7 년 전
부모
커밋
a01ff6baf8
8개의 변경된 파일27개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 0
      .gitignore
  2. 18 0
      Cargo.toml
  3. 1 0
      fcntl/Cargo.toml
  4. 1 1
      fcntl/build.rs
  5. 5 0
      src/lib.rs
  6. 0 2
      unistd/.gitignore
  7. 1 0
      unistd/Cargo.toml
  8. 1 1
      unistd/build.rs

+ 0 - 0
fcntl/.gitignore → .gitignore


+ 18 - 0
Cargo.toml

@@ -0,0 +1,18 @@
+[package]
+name = "relibc"
+version = "0.1.0"
+authors = ["Jeremy Soller <[email protected]>"]
+
+[lib]
+name = "c"
+crate-type = ["staticlib"]
+
+[workspace]
+members = [
+    "fcntl",
+    "unistd"
+]
+
+[dependencies]
+fcntl = { path = "fcntl" }
+unistd = { path = "unistd" }

+ 1 - 0
fcntl/Cargo.toml

@@ -2,6 +2,7 @@
 name = "fcntl"
 version = "0.1.0"
 authors = ["Jeremy Soller <[email protected]>"]
+build = "build.rs"
 
 [build-dependencies]
 cbindgen = "0.5"

+ 1 - 1
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");
 }

+ 5 - 0
src/lib.rs

@@ -0,0 +1,5 @@
+extern crate fcntl;
+extern crate unistd;
+
+pub use fcntl::*;
+pub use unistd::*;

+ 0 - 2
unistd/.gitignore

@@ -1,2 +0,0 @@
-/Cargo.lock
-/target/

+ 1 - 0
unistd/Cargo.toml

@@ -2,6 +2,7 @@
 name = "unistd"
 version = "0.1.0"
 authors = ["Jeremy Soller <[email protected]>"]
+build = "build.rs"
 
 [build-dependencies]
 cbindgen = "0.5"

+ 1 - 1
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");
 }