diff --git a/Cargo.lock b/Cargo.lock index fba5a15c14059c9f5b7768bdbc392a9c21e0caee..6b4f16075ed1155b3287a0b210c9a7a6be362d34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,16 +11,11 @@ name = "atty" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "base-x" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "bitflags" version = "1.0.1" @@ -32,7 +27,7 @@ version = "0.5.2" dependencies = [ "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "standalone-syn 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -64,18 +59,10 @@ dependencies = [ "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "compiler_builtins" version = "0.1.0" -source = "git+https://github.com/rust-lang-nursery/compiler-builtins.git#263a703b10351d8930e48045b4fd09768991b867" +source = "git+https://github.com/rust-lang-nursery/compiler-builtins.git#2a2f6d96c8dc578d2474742f14c9bab0b36b0408" [[package]] name = "crt0" @@ -144,11 +131,6 @@ name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "futures" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "grp" version = "0.1.0" @@ -163,17 +145,17 @@ version = "0.1.0" dependencies = [ "cbindgen 0.5.2", "platform 0.1.0", - "socket 0.1.0", + "sys_socket 0.1.0", ] [[package]] name = "itoa" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.39" +version = "0.2.40" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -192,14 +174,6 @@ dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "mman" -version = "0.1.0" -dependencies = [ - "cbindgen 0.5.2", - "platform 0.1.0", -] - [[package]] name = "netinet" version = "0.1.0" @@ -233,14 +207,6 @@ name = "quote" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "quote" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ralloc" version = "1.0.0" @@ -263,25 +229,22 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" version = "0.5.0-pre.0" -source = "git+https://github.com/rust-lang-nursery/rand/#8cca60506cfee1a56a4d7c53df681dfa48736c3d" +source = "git+https://github.com/rust-lang-nursery/rand/#1960f833c0ca54c75badd11c5af397c677f92584" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand-core 0.1.0-pre.0 (git+https://github.com/rust-lang-nursery/rand/)", - "stdweb 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.1.0-pre.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "rand-core" +name = "rand_core" version = "0.1.0-pre.0" -source = "git+https://github.com/rust-lang-nursery/rand/#8cca60506cfee1a56a4d7c53df681dfa48736c3d" +source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "redox_syscall" @@ -307,21 +270,21 @@ dependencies = [ "fenv 0.1.0", "float 0.1.0", "grp 0.1.0", - "mman 0.1.0", "netinet 0.1.0", "platform 0.1.0", - "resource 0.1.0", "semaphore 0.1.0", "signal 0.1.0", - "socket 0.1.0", - "stat 0.1.0", "stdio 0.1.0", "stdlib 0.1.0", "string 0.1.0", + "sys_mman 0.1.0", + "sys_resource 0.1.0", + "sys_socket 0.1.0", + "sys_stat 0.1.0", "sys_time 0.1.0", + "sys_wait 0.1.0", "time 0.1.0", "unistd 0.1.0", - "wait 0.1.0", "wctype 0.1.0", ] @@ -333,15 +296,6 @@ dependencies = [ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "resource" -version = "0.1.0" -dependencies = [ - "cbindgen 0.5.2", - "platform 0.1.0", - "sys_time 0.1.0", -] - [[package]] name = "sc" version = "0.2.2" @@ -357,7 +311,7 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde_derive 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", @@ -388,9 +342,9 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -401,14 +355,6 @@ dependencies = [ "platform 0.1.0", ] -[[package]] -name = "socket" -version = "0.1.0" -dependencies = [ - "cbindgen 0.5.2", - "platform 0.1.0", -] - [[package]] name = "standalone-quote" version = "0.5.0" @@ -427,14 +373,6 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "stat" -version = "0.1.0" -dependencies = [ - "cbindgen 0.5.2", - "platform 0.1.0", -] - [[package]] name = "stdio" version = "0.1.0" @@ -461,42 +399,6 @@ dependencies = [ "rand 0.5.0-pre.0 (git+https://github.com/rust-lang-nursery/rand/)", ] -[[package]] -name = "stdweb" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "stdweb-internal-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "stdweb-derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base-x 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "string" version = "0.1.0" @@ -524,21 +426,44 @@ dependencies = [ ] [[package]] -name = "syn" -version = "0.12.14" +name = "synom" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "synom" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "sys_mman" +version = "0.1.0" dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cbindgen 0.5.2", + "platform 0.1.0", +] + +[[package]] +name = "sys_resource" +version = "0.1.0" +dependencies = [ + "cbindgen 0.5.2", + "platform 0.1.0", + "sys_time 0.1.0", +] + +[[package]] +name = "sys_socket" +version = "0.1.0" +dependencies = [ + "cbindgen 0.5.2", + "platform 0.1.0", +] + +[[package]] +name = "sys_stat" +version = "0.1.0" +dependencies = [ + "cbindgen 0.5.2", + "platform 0.1.0", ] [[package]] @@ -549,6 +474,15 @@ dependencies = [ "platform 0.1.0", ] +[[package]] +name = "sys_wait" +version = "0.1.0" +dependencies = [ + "cbindgen 0.5.2", + "platform 0.1.0", + "sys_resource 0.1.0", +] + [[package]] name = "tempdir" version = "0.3.7" @@ -563,7 +497,7 @@ name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -589,7 +523,7 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -641,15 +575,6 @@ name = "vec_map" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "wait" -version = "0.1.0" -dependencies = [ - "cbindgen 0.5.2", - "platform 0.1.0", - "resource 0.1.0", -] - [[package]] name = "wctype" version = "0.1.0" @@ -680,44 +605,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4" -"checksum base-x 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f59103b47307f76e03bef1633aec7fa9e29bfb5aa6daf5a334f94233c71f6c1" "checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" "checksum cc 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2b4911e4bdcb4100c7680e7e854ff38e23f1b34d4d9e079efae3da2801341ffc" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins.git)" = "<none>" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f32b9e9aaa890fe8b9453b27ebbf3d11136a5ce59032500effd0e707bbcd80" -"checksum itoa 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92a9df60778f789c37f76778ae8d0a2471c41baa8b059d98a5873c978f549587" -"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff" +"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682" +"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" "checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364" "checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" "checksum rand 0.5.0-pre.0 (git+https://github.com/rust-lang-nursery/rand/)" = "<none>" -"checksum rand-core 0.1.0-pre.0 (git+https://github.com/rust-lang-nursery/rand/)" = "<none>" +"checksum rand_core 0.1.0-pre.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2362a41734390a5953cfbf12dbb74b4573137f7ba9dad344bba804ea4355f23a" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" "checksum sc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4ebbb026ba4a707c25caec2db5ef59ad8b41f7ad77cad06257e06229c891f376" -"checksum serde 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe95aa0d46f04ce5c3a88bdcd4114ecd6144ed0b2725ebca2f1127744357807" +"checksum serde 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c70142ae874a42c70e03c63c6a49abe2ea0079b090bf6e136e99252fc1974bd6" "checksum serde_derive 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "652bc323d694dc925829725ec6c890156d8e70ae5202919869cb00fe2eff3788" "checksum serde_derive_internals 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32f1926285523b2db55df263d2aa4eb69ddcfa7a7eade6430323637866b513ab" "checksum serde_json 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "5c508584d9913df116b91505eec55610a2f5b16e9ed793c46e4d0152872b3e74" "checksum standalone-quote 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dcedac1d6d98e7e9d1d6e628f5635af9566688ae5f6cea70a3976f495ae8d839" "checksum standalone-syn 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "115808f5187c07c23cb93eee49d542fae54c6e8285d3a24c6ff683fcde9243db" -"checksum stdweb 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d439538520bfe257b1fc2eeaa06b08dc4b56eee120b9d482c221f4bd267c9710" -"checksum stdweb-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa46e9b38ea028a8a327ae6db35a486ace3eb834f5600bb3b6a71c0b6b1bd4b" -"checksum stdweb-internal-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0bb3289dfd46bba44d80ed47a9b3d4c43bf6c1d7931b29e2fa86bd6697ccf59" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" diff --git a/Cargo.toml b/Cargo.toml index 42b6f836216ebcedcd8e765be556f0231fb87f95..3cfc826fad4927323b571883f09febf87fc58b7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,21 +18,21 @@ fcntl = { path = "src/fcntl" } fenv = { path = "src/fenv" } float = { path = "src/float" } grp = { path = "src/grp" } -mman = { path = "src/mman" } netinet = { path = "src/netinet" } platform = { path = "src/platform" } -resource = { path = "src/resource" } semaphore = { path = "src/semaphore" } signal = { path = "src/signal" } -socket = { path = "src/socket" } -stat = { path = "src/stat" } stdio = { path = "src/stdio" } stdlib = { path = "src/stdlib" } string = { path = "src/string" } +sys_mman = { path = "src/sys_mman" } +sys_resource = { path = "src/sys_resource" } +sys_socket = { path = "src/sys_socket" } +sys_stat = { path = "src/sys_stat" } sys_time = { path = "src/sys_time" } +sys_wait = { path = "src/sys_wait" } time = { path = "src/time" } unistd = { path = "src/unistd" } -wait = { path = "src/wait" } wctype = { path = "src/wctype" } [profile.dev] diff --git a/src/lib.rs b/src/lib.rs index 6e584d30b803b72cecabce7f8dc0ccd924c14b1c..7d605429f983886fe5f9c5d276c6d38a711b6ed7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,26 +4,26 @@ extern crate compiler_builtins; extern crate platform; -extern crate ctype; -extern crate errno; -extern crate fcntl; -extern crate fenv; -extern crate float; -extern crate grp; -extern crate mman; -extern crate netinet; -extern crate resource; -extern crate semaphore; -extern crate socket; -extern crate stat; -extern crate stdio; -extern crate stdlib; -extern crate string; -extern crate sys_time; -extern crate time; -extern crate unistd; -extern crate wait; -extern crate wctype; +pub extern crate ctype; +pub extern crate errno; +pub extern crate fcntl; +pub extern crate fenv; +pub extern crate float; +pub extern crate grp; +pub extern crate netinet; +pub extern crate semaphore; +pub extern crate stdio; +pub extern crate stdlib; +pub extern crate string; +pub extern crate sys_mman; +pub extern crate sys_resource; +pub extern crate sys_socket; +pub extern crate sys_stat; +pub extern crate sys_time; +pub extern crate sys_wait; +pub extern crate time; +pub extern crate unistd; +pub extern crate wctype; #[lang = "eh_personality"] #[no_mangle] diff --git a/src/netinet/in/Cargo.toml b/src/netinet/in/Cargo.toml index 4bd5518ba25d7b3200171f5777861d8f1fd56353..b6f5356c0bc9fd09cfe8cdf9ad1fe09e1b2d1ca0 100644 --- a/src/netinet/in/Cargo.toml +++ b/src/netinet/in/Cargo.toml @@ -9,4 +9,4 @@ cbindgen = { path = "../../../cbindgen" } [dependencies] platform = { path = "../../platform" } -socket = { path = "../../socket" } +sys_socket = { path = "../../sys_socket" } diff --git a/src/netinet/in/src/lib.rs b/src/netinet/in/src/lib.rs index 789a9e4b4b02309951b05a7ce0da7863dbd7f791..0994028d65d23f95da18904cc9d4dd6e5bdd6065 100644 --- a/src/netinet/in/src/lib.rs +++ b/src/netinet/in/src/lib.rs @@ -3,10 +3,10 @@ #![allow(non_camel_case_types)] extern crate platform; -extern crate socket; +extern crate sys_socket; use platform::types::*; -use socket::sa_family_t; +use sys_socket::sa_family_t; pub type in_addr_t = u32; pub type in_port_t = u16; diff --git a/src/mman/Cargo.toml b/src/sys_mman/Cargo.toml similarity index 92% rename from src/mman/Cargo.toml rename to src/sys_mman/Cargo.toml index 9d672ec75f1bfa70dfdab17b74319f74f94e0e2b..4f7c08b1e45e2bceabbe71ecf231df64e090d645 100644 --- a/src/mman/Cargo.toml +++ b/src/sys_mman/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "mman" +name = "sys_mman" version = "0.1.0" authors = ["Jeremy Soller <jackpot51@gmail.com>"] build = "build.rs" diff --git a/src/mman/build.rs b/src/sys_mman/build.rs similarity index 100% rename from src/mman/build.rs rename to src/sys_mman/build.rs diff --git a/src/mman/cbindgen.toml b/src/sys_mman/cbindgen.toml similarity index 100% rename from src/mman/cbindgen.toml rename to src/sys_mman/cbindgen.toml diff --git a/src/mman/src/lib.rs b/src/sys_mman/src/lib.rs similarity index 89% rename from src/mman/src/lib.rs rename to src/sys_mman/src/lib.rs index ab4651126af2b65899fb7b911642600fe4c4d14a..bfc25b8870dba893d008067f3f16f03af631bdca 100644 --- a/src/mman/src/lib.rs +++ b/src/sys_mman/src/lib.rs @@ -4,6 +4,16 @@ extern crate platform; use platform::types::*; +pub use sys::*; + +#[cfg(target_os = "linux")] +#[path = "linux.rs"] +pub mod sys; + +#[cfg(target_os = "redox")] +#[path = "redox.rs"] +pub mod sys; + #[no_mangle] pub extern "C" fn mlock(addr: *const c_void, len: usize) -> c_int { unimplemented!(); diff --git a/src/sys_mman/src/linux.rs b/src/sys_mman/src/linux.rs new file mode 100644 index 0000000000000000000000000000000000000000..1e00227153c8edb59c915816bea064a940ce7670 --- /dev/null +++ b/src/sys_mman/src/linux.rs @@ -0,0 +1,9 @@ +use platform::types::*; + +pub const PROT_READ: c_int = 0x1; +pub const PROT_WRITE: c_int = 0x2; +pub const PROT_EXEC: c_int = 0x4; +pub const PROT_NONE: c_int = 0x0; + +pub const MAP_SHARED: c_int = 0x1; +pub const MAP_PRIVATE: c_int = 0x2; diff --git a/src/sys_mman/src/redox.rs b/src/sys_mman/src/redox.rs new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/resource/Cargo.toml b/src/sys_resource/Cargo.toml similarity index 91% rename from src/resource/Cargo.toml rename to src/sys_resource/Cargo.toml index 30cee970179f25980586034475e363b9f7c296d7..a1bea8424e5776df698d5222492d6feb034e4fb0 100644 --- a/src/resource/Cargo.toml +++ b/src/sys_resource/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "resource" +name = "sys_resource" version = "0.1.0" authors = ["Dan Robertson <danlrobertson89@gmail.com>"] diff --git a/src/resource/build.rs b/src/sys_resource/build.rs similarity index 100% rename from src/resource/build.rs rename to src/sys_resource/build.rs diff --git a/src/resource/cbindgen.toml b/src/sys_resource/cbindgen.toml similarity index 100% rename from src/resource/cbindgen.toml rename to src/sys_resource/cbindgen.toml diff --git a/src/resource/src/lib.rs b/src/sys_resource/src/lib.rs similarity index 100% rename from src/resource/src/lib.rs rename to src/sys_resource/src/lib.rs diff --git a/src/socket/Cargo.toml b/src/sys_socket/Cargo.toml similarity index 91% rename from src/socket/Cargo.toml rename to src/sys_socket/Cargo.toml index 12801f04aa3576e1aa1d6df54a575dfc5f4b94d3..0c3cc667e1c79cdb34280a0d6a151d86571e6128 100644 --- a/src/socket/Cargo.toml +++ b/src/sys_socket/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "socket" +name = "sys_socket" version = "0.1.0" authors = ["Dan Robertson <danlrobertson89@gmail.com>"] build = "build.rs" diff --git a/src/socket/build.rs b/src/sys_socket/build.rs similarity index 100% rename from src/socket/build.rs rename to src/sys_socket/build.rs diff --git a/src/socket/cbindgen.toml b/src/sys_socket/cbindgen.toml similarity index 100% rename from src/socket/cbindgen.toml rename to src/sys_socket/cbindgen.toml diff --git a/src/socket/src/lib.rs b/src/sys_socket/src/lib.rs similarity index 100% rename from src/socket/src/lib.rs rename to src/sys_socket/src/lib.rs diff --git a/src/stat/Cargo.toml b/src/sys_stat/Cargo.toml similarity index 92% rename from src/stat/Cargo.toml rename to src/sys_stat/Cargo.toml index 7b779a2cf59d360792e692074bfa66fd4925f1d7..4d04bee7d8496f13ac4c91f7a143b90636809880 100644 --- a/src/stat/Cargo.toml +++ b/src/sys_stat/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "stat" +name = "sys_stat" version = "0.1.0" authors = ["Jeremy Soller <jackpot51@gmail.com>"] build = "build.rs" diff --git a/src/stat/build.rs b/src/sys_stat/build.rs similarity index 100% rename from src/stat/build.rs rename to src/sys_stat/build.rs diff --git a/src/stat/cbindgen.toml b/src/sys_stat/cbindgen.toml similarity index 100% rename from src/stat/cbindgen.toml rename to src/sys_stat/cbindgen.toml diff --git a/src/stat/src/lib.rs b/src/sys_stat/src/lib.rs similarity index 100% rename from src/stat/src/lib.rs rename to src/sys_stat/src/lib.rs diff --git a/src/wait/Cargo.toml b/src/sys_wait/Cargo.toml similarity index 76% rename from src/wait/Cargo.toml rename to src/sys_wait/Cargo.toml index 50d48a5efe7d627819fd979779d27326cfc535e9..44250ca7f724f152dccf672ad2615bcaf3db4b70 100644 --- a/src/wait/Cargo.toml +++ b/src/sys_wait/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "wait" +name = "sys_wait" version = "0.1.0" authors = ["Dan Robertson <danlrobertson89@gmail.com>"] @@ -8,4 +8,4 @@ cbindgen = { path = "../../cbindgen" } [dependencies] platform = { path = "../platform" } -resource = { path = "../resource" } +sys_resource = { path = "../sys_resource" } diff --git a/src/wait/build.rs b/src/sys_wait/build.rs similarity index 100% rename from src/wait/build.rs rename to src/sys_wait/build.rs diff --git a/src/wait/cbindgen.toml b/src/sys_wait/cbindgen.toml similarity index 100% rename from src/wait/cbindgen.toml rename to src/sys_wait/cbindgen.toml diff --git a/src/wait/src/lib.rs b/src/sys_wait/src/lib.rs similarity index 94% rename from src/wait/src/lib.rs rename to src/sys_wait/src/lib.rs index 88b2a56e81deff5f98d89c84034237bd15a39773..8881fb128adf100b625f6309a4d8517e51168801 100644 --- a/src/wait/src/lib.rs +++ b/src/sys_wait/src/lib.rs @@ -4,10 +4,10 @@ #![no_std] extern crate platform; -extern crate resource; +extern crate sys_resource; use platform::types::*; -use resource::rusage; +use sys_resource::rusage; #[no_mangle] pub unsafe extern "C" fn wait(stat_loc: *mut c_int) -> pid_t {