Jeremy Soller hace 7 años
padre
commit
083fd72e66

+ 5 - 5
Cargo.toml

@@ -13,11 +13,11 @@ members = ["crt0"]
 [dependencies]
 compiler_builtins = { git = "https://github.com/rust-lang-nursery/compiler-builtins.git", default-features = false, features = ["mem"] }
 platform = { path = "platform" }
-fcntl = { path = "fcntl" }
-stdio = { path = "stdio" }
-stdlib = { path = "stdlib" }
-string = { path = "string" }
-unistd = { path = "unistd" }
+fcntl = { path = "src/fcntl" }
+stdio = { path = "src/stdio" }
+stdlib = { path = "src/stdlib" }
+string = { path = "src/string" }
+unistd = { path = "src/unistd" }
 
 [profile.dev]
 panic = "abort"

+ 2 - 2
fcntl/Cargo.toml → src/fcntl/Cargo.toml

@@ -5,7 +5,7 @@ authors = ["Jeremy Soller <jackpot51@gmail.com>"]
 build = "build.rs"
 
 [build-dependencies]
-cbindgen = { path = "../cbindgen" }
+cbindgen = { path = "../../cbindgen" }
 
 [dependencies]
-platform = { path = "../platform" }
+platform = { path = "../../platform" }

+ 2 - 2
stdlib/build.rs → src/fcntl/build.rs

@@ -4,8 +4,8 @@ use std::{env, fs};
 
 fn main() {
     let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../target/include").expect("failed to create include directory");
+    fs::create_dir_all("../../target/include").expect("failed to create include directory");
     cbindgen::generate(crate_dir)
       .expect("failed to generate bindings")
-      .write_to_file("../target/include/stdlib.h");
+      .write_to_file("../../target/include/fcntl.h");
 }

+ 0 - 0
fcntl/cbindgen.toml → src/fcntl/cbindgen.toml


+ 0 - 0
fcntl/src/lib.rs → src/fcntl/src/lib.rs


+ 0 - 0
fcntl/src/linux.rs → src/fcntl/src/linux.rs


+ 0 - 0
fcntl/src/redox.rs → src/fcntl/src/redox.rs


+ 2 - 2
stdio/Cargo.toml → src/stdio/Cargo.toml

@@ -5,8 +5,8 @@ authors = ["Jeremy Soller <jackpot51@gmail.com>"]
 build = "build.rs"
 
 [build-dependencies]
-cbindgen = { path = "../cbindgen" }
+cbindgen = { path = "../../cbindgen" }
 
 [dependencies]
-platform = { path = "../platform" }
+platform = { path = "../../platform" }
 va_list = { version = "0.1", features = ["no_std"] }

+ 2 - 2
fcntl/build.rs → src/stdio/build.rs

@@ -4,8 +4,8 @@ use std::{env, fs};
 
 fn main() {
     let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../target/include").expect("failed to create include directory");
+    fs::create_dir_all("../../target/include").expect("failed to create include directory");
     cbindgen::generate(crate_dir)
       .expect("failed to generate bindings")
-      .write_to_file("../target/include/fcntl.h");
+      .write_to_file("../../target/include/stdio.h");
 }

+ 0 - 0
stdio/cbindgen.toml → src/stdio/cbindgen.toml


+ 0 - 0
stdio/src/lib.rs → src/stdio/src/lib.rs


+ 0 - 0
stdio/src/printf.rs → src/stdio/src/printf.rs


+ 3 - 3
stdlib/Cargo.toml → src/stdlib/Cargo.toml

@@ -5,8 +5,8 @@ authors = ["Jeremy Soller <jackpot51@gmail.com>"]
 build = "build.rs"
 
 [build-dependencies]
-cbindgen = { path = "../cbindgen" }
+cbindgen = { path = "../../cbindgen" }
 
 [dependencies]
-platform = { path = "../platform" }
-ralloc = { path = "../ralloc", default-features = false }
+platform = { path = "../../platform" }
+ralloc = { path = "../../ralloc", default-features = false }

+ 2 - 2
string/build.rs → src/stdlib/build.rs

@@ -4,8 +4,8 @@ use std::{env, fs};
 
 fn main() {
     let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../target/include").expect("failed to create include directory");
+    fs::create_dir_all("../../target/include").expect("failed to create include directory");
     cbindgen::generate(crate_dir)
       .expect("failed to generate bindings")
-      .write_to_file("../target/include/string.h");
+      .write_to_file("../../target/include/stdlib.h");
 }

+ 0 - 0
stdlib/cbindgen.toml → src/stdlib/cbindgen.toml


+ 0 - 0
stdlib/src/lib.rs → src/stdlib/src/lib.rs


+ 2 - 2
string/Cargo.toml → src/string/Cargo.toml

@@ -5,7 +5,7 @@ authors = ["Jeremy Soller <jackpot51@gmail.com>"]
 build = "build.rs"
 
 [build-dependencies]
-cbindgen = { path = "../cbindgen" }
+cbindgen = { path = "../../cbindgen" }
 
 [dependencies]
-platform = { path = "../platform" }
+platform = { path = "../../platform" }

+ 2 - 2
stdio/build.rs → src/string/build.rs

@@ -4,8 +4,8 @@ use std::{env, fs};
 
 fn main() {
     let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../target/include").expect("failed to create include directory");
+    fs::create_dir_all("../../target/include").expect("failed to create include directory");
     cbindgen::generate(crate_dir)
       .expect("failed to generate bindings")
-      .write_to_file("../target/include/stdio.h");
+      .write_to_file("../../target/include/string.h");
 }

+ 0 - 0
string/cbindgen.toml → src/string/cbindgen.toml


+ 0 - 0
string/src/lib.rs → src/string/src/lib.rs


+ 0 - 0
aio/lib.rs → src/todo/aio/lib.rs


+ 0 - 0
ctype/lib.rs → src/todo/ctype/lib.rs


+ 0 - 0
grp/lib.rs → src/todo/grp/lib.rs


+ 0 - 0
mman/lib.rs → src/todo/mman/lib.rs


+ 0 - 0
pthread/lib.rs → src/todo/pthread/lib.rs


+ 0 - 0
semaphore/lib.rs → src/todo/semaphore/lib.rs


+ 0 - 0
wchar/lib.rs → src/todo/wchar/lib.rs


+ 0 - 0
wctype/lib.rs → src/todo/wctype/lib.rs


+ 2 - 2
unistd/Cargo.toml → src/unistd/Cargo.toml

@@ -5,7 +5,7 @@ authors = ["Jeremy Soller <jackpot51@gmail.com>"]
 build = "build.rs"
 
 [build-dependencies]
-cbindgen = { path = "../cbindgen" }
+cbindgen = { path = "../../cbindgen" }
 
 [dependencies]
-platform = { path = "../platform" }
+platform = { path = "../../platform" }

+ 11 - 0
src/unistd/build.rs

@@ -0,0 +1,11 @@
+extern crate cbindgen;
+
+use std::{env, fs};
+
+fn main() {
+    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
+    fs::create_dir_all("../../target/include").expect("failed to create include directory");
+    cbindgen::generate(crate_dir)
+      .expect("failed to generate bindings")
+      .write_to_file("../../target/include/unistd.h");
+}

+ 0 - 0
unistd/cbindgen.toml → src/unistd/cbindgen.toml


+ 0 - 0
unistd/src/lib.rs → src/unistd/src/lib.rs


+ 0 - 11
unistd/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-      .expect("failed to generate bindings")
-      .write_to_file("../target/include/unistd.h");
-}