diff --git a/.gitignore b/.gitignore index a3e3243..378eac2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1 @@ build -target -initfs/bin -filesystem/bin -filesystem/ref -filesystem/sbin diff --git a/.gitmodules b/.gitmodules index 3eeeb4d..16b9f4f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,123 +1,18 @@ -[submodule "rust"] - path = rust - url = https://github.com/redox-os/rust.git -[submodule "ion"] - path = programs/ion - url = https://github.com/redox-os/ion.git -[submodule "programs/coreutils"] - path = programs/coreutils - url = https://github.com/redox-os/coreutils.git -[submodule "schemes/redoxfs"] - path = schemes/redoxfs - url = https://github.com/redox-os/redoxfs -[submodule "programs/extrautils"] - path = programs/extrautils - url = https://github.com/redox-os/extrautils.git -[submodule "programs/smith"] - path = programs/smith - url = https://github.com/IGI-111/Smith.git -[submodule "programs/userutils"] - path = programs/userutils - url = https://github.com/redox-os/userutils.git -[submodule "programs/netutils"] - path = programs/netutils - url = https://github.com/redox-os/netutils.git -[submodule "schemes/orbital"] - path = schemes/orbital - url = https://github.com/redox-os/orbital.git -[submodule "programs/orbutils"] - path = programs/orbutils - url = https://github.com/redox-os/orbutils.git -[submodule "filesystem/ui"] - path = filesystem/ui - url = https://github.com/redox-os/orbdata.git -[submodule "programs/acid"] - path = programs/acid - url = https://github.com/redox-os/acid.git -[submodule "programs/pkgutils"] - path = programs/pkgutils - url = https://github.com/redox-os/pkgutils.git -[submodule "installer"] - path = installer - url = https://github.com/redox-os/installer.git -[submodule "docgen"] - path = docgen - url = https://github.com/redox-os/docgen.git -[submodule "libc-artifacts"] - path = libc-artifacts - url = https://github.com/redox-os/libc-artifacts.git -[submodule "kernel"] - path = kernel - url = https://github.com/redox-os/kernel.git -[submodule "drivers"] - path = drivers - url = https://github.com/redox-os/drivers.git [submodule "bootloader"] path = bootloader url = https://github.com/redox-os/bootloader.git -[submodule "isolinux"] - path = isolinux - url = https://github.com/redox-os/isolinux.git -[submodule "programs/init"] - path = programs/init - url = https://github.com/redox-os/init.git -[submodule "libs/orbclient"] - path = libs/orbclient - url = https://github.com/redox-os/orbclient.git -[submodule "libs/orbtk"] - path = libs/orbtk - url = https://github.com/redox-os/orbtk.git -[submodule "libs/orbimage"] - path = libs/orbimage - url = https://github.com/redox-os/orbimage.git -[submodule "libs/orbfont"] - path = libs/orbfont - url = https://github.com/redox-os/orbfont.git -[submodule "libs/jpeg-decoder"] - path = libs/jpeg-decoder - url = https://github.com/redox-os/jpeg-decoder.git -[submodule "libs/termion"] - path = libs/termion - url = https://github.com/redox-os/termion.git -[submodule "libs/syscall"] - path = libs/syscall - url = https://github.com/redox-os/syscall.git -[submodule "libs/extra"] - path = libs/extra - url = https://github.com/redox-os/libextra.git -[submodule "libs/event"] - path = libs/event - url = https://github.com/redox-os/event.git -[submodule "libs/pager"] - path = libs/pager - url = https://github.com/redox-os/libpager.git -[submodule "libs/ransid"] - path = libs/ransid - url = https://github.com/redox-os/ransid.git -[submodule "libs/same-file"] - path = libs/same-file - url = https://github.com/redox-os/same-file.git -[submodule "libs/mio"] - path = libs/mio - url = https://github.com/redox-os/mio.git -[submodule "programs/binutils"] - path = programs/binutils - url = https://github.com/redox-os/binutils.git -[submodule "programs/games"] - path = programs/games - url = https://github.com/redox-os/games.git -[submodule "programs/sodium"] - path = programs/sodium - url = https://github.com/redox-os/sodium.git -[submodule "libs/ralloc"] - path = libs/ralloc - url = https://github.com/redox-os/ralloc.git -[submodule "libs/tar"] - path = libs/tar - url = https://github.com/redox-os/tar-rs.git -[submodule "programs/orbterm"] - path = programs/orbterm - url = https://github.com/redox-os/orbterm.git [submodule "cookbook"] path = cookbook url = https://github.com/redox-os/cookbook.git +[submodule "installer"] + path = installer + url = https://github.com/redox-os/installer.git +[submodule "isolinux"] + path = isolinux + url = https://github.com/redox-os/isolinux.git +[submodule "kernel"] + path = kernel + url = https://github.com/redox-os/kernel.git +[submodule "rust"] + path = rust + url = https://github.com/redox-os/rust.git diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 2350312..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2365 +0,0 @@ -[root] -name = "xhcid" -version = "0.1.0" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "acid" -version = "0.1.0" -dependencies = [ - "x86 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "adler32" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ahcid" -version = "0.1.0" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "alloc_kernel" -version = "0.1.0" -dependencies = [ - "linked_list_allocator 0.2.5 (git+https://github.com/phil-opp/linked-list-allocator.git)", - "spin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "alxd" -version = "0.1.0" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ansi_term" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "argon2rs" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "blake2-rfc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "arrayvec" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nodrop 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bgad" -version = "0.1.0" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "binutils" -version = "0.1.0" -dependencies = [ - "extra 0.1.0 (git+https://github.com/redox-os/libextra.git)", -] - -[[package]] -name = "bitflags" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "blake2-rfc" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "constant_time_eq 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bytes" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "clipboard" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "clipboard-win 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.13.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "clipboard-win" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "windows-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "color_quant" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "constant_time_eq" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "contain" -version = "0.1.0" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "coreutils" -version = "0.1.0" -dependencies = [ - "extra 0.1.0 (git+https://github.com/redox-os/libextra.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "csv" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "debug_unreachable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "deflate" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "deque" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "docgen" -version = "0.1.0" -dependencies = [ - "walkdir 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "docopt" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "e1000d" -version = "0.1.0" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding" -version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-japanese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-korean" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-simpchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-singlebyte" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-tradchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding_index_tests" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "enum_primitive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "env_logger" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "error-chain" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ethernetd" -version = "0.1.0" -dependencies = [ - "netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "extra" -version = "0.1.0" -source = "git+https://github.com/redox-os/libextra.git#402932084acd5fef4812945887ceaaa2ddd5f264" - -[[package]] -name = "extra" -version = "0.1.0" - -[[package]] -name = "extrautils" -version = "0.1.0" -dependencies = [ - "extra 0.1.0 (git+https://github.com/redox-os/libextra.git)", - "libflate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "pager 0.1.0 (git+https://github.com/redox-os/libpager.git)", - "raw-cpuid 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.11 (git+https://github.com/redox-os/tar-rs.git)", - "termion 1.3.0 (git+https://github.com/redox-os/termion.git)", -] - -[[package]] -name = "flate2" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fnv" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuse" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread-scoped 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "futf" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "games-for-redox" -version = "0.1.0" -dependencies = [ - "extra 0.1.0 (git+https://github.com/redox-os/libextra.git)", - "libgo 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "gcc" -version = "0.3.45" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "generic-array" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typenum 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "gif" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "glob" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "goblin" -version = "0.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "scroll 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "html5ever" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tendril 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "html5ever-atoms" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "string_cache 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_codegen 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hyper-rustls" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki-roots 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "idna" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "image" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "jpeg-decoder 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "png 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "inflate" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "init" -version = "0.1.0" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ion-shell" -version = "1.0.1" -dependencies = [ - "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "peg 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "permutate 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallstring 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "users 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ipd" -version = "0.1.0" -dependencies = [ - "netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "jpeg-decoder" -version = "0.1.12" -dependencies = [ - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "png 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "jpeg-decoder" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "jpeg-decoder 0.1.12" - -[[package]] -name = "kernel" -version = "0.1.0" -dependencies = [ - "alloc_kernel 0.1.0", - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "goblin 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "raw-cpuid 3.0.0 (git+https://github.com/gz/rust-cpuid)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "x86 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazycell" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libflate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "libgo" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "liner" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "linked-hash-map" -version = "0.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "linked_list_allocator" -version = "0.2.5" -source = "git+https://github.com/phil-opp/linked-list-allocator.git#ea8548db4b5a6ee0e2b847e96d6b4c31b7744567" - -[[package]] -name = "log" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lzw" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "matches" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "memchr" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "metadeps" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime_guess" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz-sys" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mio" -version = "0.6.2" -dependencies = [ - "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miow" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "net2" -version = "0.2.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "netutils" -version = "0.1.0" -source = "git+https://github.com/redox-os/netutils.git#074c900be31586f405cc46503a807e7ab8a7a2bb" -dependencies = [ - "hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "netutils" -version = "0.1.0" -dependencies = [ - "hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nix" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nodrop" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ntpclient" -version = "0.0.1" -source = "git+https://github.com/willem66745/ntpclient-rust#7e3bdf60eb940825789a8da5181025320e3050b0" -dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-bigint 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-bigint" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-complex" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-integer" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-iter" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-rational" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-bigint 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-traits" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "num_cpus" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nvmed" -version = "0.1.0" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "objc" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "objc_id" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "octavo" -version = "0.1.1" -source = "git+https://github.com/libOctavo/octavo.git#d94d924616dca83b9c6cfc815062276c5908713a" -dependencies = [ - "octavo-digest 0.1.2 (git+https://github.com/libOctavo/octavo.git)", -] - -[[package]] -name = "octavo-digest" -version = "0.1.2" -source = "git+https://github.com/libOctavo/octavo.git#d94d924616dca83b9c6cfc815062276c5908713a" -dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "static-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "typenum 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "odds" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "orbclient" -version = "0.3.4" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "orbclient" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "orbclient 0.3.4" - -[[package]] -name = "orbfont" -version = "0.1.8" -dependencies = [ - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rusttype 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "orbfont" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "orbfont 0.1.8" - -[[package]] -name = "orbimage" -version = "0.1.15" -dependencies = [ - "image 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "resize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "orbimage" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "orbimage 0.1.15" - -[[package]] -name = "orbital" -version = "0.1.0" -dependencies = [ - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "orbfont 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "orbimage 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "resize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "orbterm" -version = "0.1.2" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "orbfont 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ransid 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_event 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "orbtk" -version = "0.2.19" -dependencies = [ - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "orbfont 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "orbimage 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "orbtk" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "orbtk 0.2.19" - -[[package]] -name = "orbutils" -version = "0.1.14" -dependencies = [ - "html5ever 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "orbfont 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "orbimage 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "orbtk 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tendril 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "userutils 0.1.0 (git+https://github.com/redox-os/userutils.git)", -] - -[[package]] -name = "pager" -version = "0.1.0" -source = "git+https://github.com/redox-os/libpager.git#62b01eba8299143a1a5a78b36d85ab63251462b3" -dependencies = [ - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pager" -version = "0.1.0" -dependencies = [ - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pcid" -version = "0.1.0" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "peg" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "permutate" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "phf" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_codegen" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_generator" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_shared" -version = "0.7.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pkg-config" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "pkgutils" -version = "0.1.0" -source = "git+https://github.com/redox-os/pkgutils.git#b9c10c980e1724270b7e90d3c2d4999c398814b8" -dependencies = [ - "hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "octavo 0.1.1 (git+https://github.com/libOctavo/octavo.git)", - "serde 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.11 (git+https://github.com/redox-os/tar-rs.git)", - "toml 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version-compare 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pkgutils" -version = "0.1.0" -dependencies = [ - "hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-rustls 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "octavo 0.1.1 (git+https://github.com/libOctavo/octavo.git)", - "serde 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.11 (git+https://github.com/redox-os/tar-rs.git)", - "toml 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version-compare 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "png" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "png" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "deflate 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", - "inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ps2d" -version = "0.1.0" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ptyd" -version = "0.1.0" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rand" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "randd" -version = "0.1.0" -dependencies = [ - "raw-cpuid 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ransid" -version = "0.2.7" - -[[package]] -name = "ransid" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "ransid 0.2.7" - -[[package]] -name = "raw-cpuid" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "raw-cpuid" -version = "3.0.0" -source = "git+https://github.com/gz/rust-cpuid#d8ff30d61fb2ef4700c88cb787f47f4085863c90" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rayon-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon-core" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "deque 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_event" -version = "0.1.0" -source = "git+https://github.com/redox-os/event.git#1333e640e1c58cf3808372147f34e91ff0d7f13c" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_event" -version = "0.1.0" -dependencies = [ - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_event" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "redox_event 0.1.0" - -[[package]] -name = "redox_installer" -version = "0.1.0" -dependencies = [ - "liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "pkgutils 0.1.0 (git+https://github.com/redox-os/pkgutils.git)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "userutils 0.1.0 (git+https://github.com/redox-os/userutils.git)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.17" - -[[package]] -name = "redox_syscall" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "redox_syscall 0.1.17" - -[[package]] -name = "redoxfs" -version = "0.1.2" -dependencies = [ - "fuse 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex-syntax" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "resize" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ring" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ropey" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rtl8168d" -version = "0.1.0" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustls" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rusttype" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "stb_truetype 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "same-file" -version = "0.1.2" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "same-file" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "scoped_threadpool" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "scroll" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "sdl2" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2-sys 0.27.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sdl2-sys" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_codegen" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_codegen_internals 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_codegen_internals" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "syn 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_codegen_internals" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive" -version = "0.8.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde_codegen 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive_internals" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "siphasher" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "slab" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "smallstring" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "smallvec 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "smallvec" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "smith" -version = "0.3.10" -dependencies = [ - "clipboard 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "ropey 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sodium" -version = "0.1.0" -dependencies = [ - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "spin" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "static-buffer" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "generic-array 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typenum 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "stb_truetype" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string_cache" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_codegen 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string_cache_codegen" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string_cache_shared" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "strsim" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "syn" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (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 = "syn" -version = "0.11.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (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" -dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tar" -version = "0.4.11" -source = "git+https://github.com/redox-os/tar-rs.git#1ccf2baf1703bd30807c3f11a8a874ea53af6f74" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tar" -version = "0.4.11" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tcpd" -version = "0.1.0" -dependencies = [ - "netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tempdir" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tendril" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "utf-8 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "termion" -version = "1.3.0" -source = "git+https://github.com/redox-os/termion.git#550b9ea50a11c838533a0cf2cd9c8f7584927cdb" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "termion" -version = "1.3.0" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "termion" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "termion 1.3.0" - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-id" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-scoped" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "timeout" -version = "0.1.0" -dependencies = [ - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "toml" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "toml" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "toml" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "typenum" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "udpd" -version = "0.1.0" -dependencies = [ - "netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicase" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-segmentation" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unreachable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "untrusted" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "url" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "user32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "userutils" -version = "0.1.0" -source = "git+https://github.com/redox-os/userutils.git#3ca18917f88130f4734bcb4643a410e62e6cb24c" -dependencies = [ - "argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "userutils" -version = "0.1.0" -dependencies = [ - "argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf-8" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "utf8-ranges" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "vboxd" -version = "0.1.0" -dependencies = [ - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_event 0.1.0 (git+https://github.com/redox-os/event.git)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "version-compare" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "version_check" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "vesad" -version = "0.1.0" -dependencies = [ - "orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ransid 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "rusttype 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "walkdir" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "walkdir" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "webpki" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ring 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "webpki-roots" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "untrusted 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "windows-error" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "x11" -version = "2.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", - "metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "x86" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "csv 0.14.7 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "raw-cpuid 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "xattr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ff33fe13a08dbce05bcefa2c68eea4844941437e33d6f808240b54d7157b9cd" -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" -"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" -"checksum argon2rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3f67b0b6a86dae6e67ff4ca2b6201396074996379fba2b92ff649126f37cb392" -"checksum arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "699e63a93b79d717e8c3b5eb1b28b7780d0d6d9e59a72eb769291c83b0c8dc67" -"checksum base64 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2015e3793554aa5b6007e3a72959e84c1070039e74f13dde08fa64afe1ddd892" -"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3" -"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum blake2-rfc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "0c6a476f32fef3402f1161f89d0d39822809627754a126f8441ff2a9d45e2d59" -"checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" -"checksum byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96c8b41881888cc08af32d47ac4edd52bc7fa27fef774be47a92443756451304" -"checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" -"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8" -"checksum bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c129aff112dcc562970abb69e2508b40850dd24c274761bb50fb8a0067ba6c27" -"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c" -"checksum clipboard 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "811169a9ffda99ed1841a6db3c48cffbab9a9101376f77fee3c14a7581ab933d" -"checksum clipboard-win 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f05017278a9e5485eacce962c9efc52f720eef0d19646dc3a7af714aad22ed2c" -"checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d" -"checksum constant_time_eq 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "07dcb7959f0f6f1cf662f9a7ff389bcb919924d99ac41cf31f10d611d8721323" -"checksum csv 0.14.7 (registry+https://github.com/rust-lang/crates.io-index)" = "266c1815d7ca63a5bd86284043faf91e8c95e943e55ce05dc0ae08e952de18bc" -"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" -"checksum deflate 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8f39474a23b492b7ec97604c7828abd05771b28ed03cac0c6b884e79f9980283" -"checksum deque 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a694dae478589798d752c7125542f8a5ae8b6e59476172baf2eed67357bdfa27" -"checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8" -"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" -"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" -"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" -"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" -"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" -"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" -"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" -"checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" -"checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f" -"checksum error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "318cb3c71ee4cdea69fdc9e15c173b245ed6063e1709029e8fd32525a881120f" -"checksum extra 0.1.0 (git+https://github.com/redox-os/libextra.git)" = "" -"checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c" -"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" -"checksum fuse 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "adf08478eb39cff95e34daa7a2743a256d1c18388c0328d2f717e8ef748001f6" -"checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3" -"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae" -"checksum generic-array 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3406a3975bc944fdd85b7964d53296a0ff11f4b6c4704fa4972c9a7c8ba27367" -"checksum gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a80d6fe9e52f637df9afd4779449a7be17c39cc9c35b01589bb833f956ba596" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum goblin 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3536832676b9c0bde31ef9b6d1c8a9cc897267eaf15caaddcaef313f94b42e53" -"checksum html5ever 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a358fef34c3334e92cd34d83ce870a386334e605e7abe987a69a7078a4142c69" -"checksum html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4109e35fec157307b918eb9d5b7018e2fa771aea0c04831e22003ac4722fbd1b" -"checksum httparse 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21" -"checksum hyper 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)" = "94da93321c171e26481afeebe8288757b0501901b7c5492648163d8ec4942ec5" -"checksum hyper-rustls 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "68fdeacba341bed69e9b8fb8acbe618f18c5614e173895635ee7cb7eae57fd3d" -"checksum idna 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac85ec3f80c8e4e99d9325521337e14ec7555c458a14e377d189659a427f375" -"checksum image 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d95816db758249fe16f23a4e23f1a3a817fe11892dbfd1c5836f625324702158" -"checksum inflate 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7e0062d2dc2f17d2f13750d95316ae8a2ff909af0fda957084f5defd87c43bb" -"checksum jpeg-decoder 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "919d49b634cde303392353c5dd51153ec005a1a981c6f4b8277692a51e9d260d" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" -"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b" -"checksum libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122" -"checksum libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "babb8281da88cba992fa1f4ddec7d63ed96280a1a53ec9b919fd37b53d71e502" -"checksum libflate 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7aa60ce680c15f96b74bd6208256f112049ab20fd6da510f27f82cb78323a77" -"checksum libgo 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "99a64661b7d5c8b2ccb779e3fb0ced098426bb9bfbded934aa76ef227300e0cf" -"checksum liner 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f9e406164c25b420480023985bdf65cef366855666ad4cb12cd3eaee82dcb399" -"checksum linked-hash-map 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "f26e961e0c884309cd527b1402a5409d35db612b36915d755e1a4f5c1547a31c" -"checksum linked_list_allocator 0.2.5 (git+https://github.com/phil-opp/linked-list-allocator.git)" = "" -"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" -"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" -"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" -"checksum metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829fffe7ea1d747e23f64be972991bc516b2f1ac2ae4a3b33d8bea150c410151" -"checksum mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5514f038123342d01ee5f95129e4ef1e0470c93bc29edf058a46f9ee3ba6737e" -"checksum mime_guess 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76da6df85047af8c0edfa53f48eb1073012ce1cc95c8fedc0a374f659a89dd65" -"checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" -"checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1" -"checksum net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "bc01404e7568680f1259aa5729539f221cb1e6d047a0d9053cab4be8a73b5d67" -"checksum netutils 0.1.0 (git+https://github.com/redox-os/netutils.git)" = "" -"checksum nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0d95c5fa8b641c10ad0b8887454ebaafa3c92b5cd5350f8fc693adafd178e7b" -"checksum nodrop 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "52cd74cd09beba596430cc6e3091b74007169a56246e1262f0ba451ea95117b2" -"checksum ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)" = "" -"checksum num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "98b15ba84e910ea7a1973bccd3df7b31ae282bf9d8bd2897779950c9b8303d40" -"checksum num-bigint 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ba6d838b16e56da1b6c383d065ff1ec3c7d7797f65a3e8f6ba7092fd87820bac" -"checksum num-complex 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "148eb324ca772230853418731ffdf13531738b50f89b30692a01fcdcb0a64677" -"checksum num-integer 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "ef1a4bf6f9174aa5783a9b4cc892cacd11aebad6c69ad027a0b65c6ca5f8aa37" -"checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e" -"checksum num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dc5ea04020a8f18318ae485c751f8cfa1c0e69dcf465c29ddaaa64a313cc44" -"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99" -"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167" -"checksum objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "877f30f37acef6749b1841cceab289707f211aecfc756553cd63976190e6cc2e" -"checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -"checksum objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4730aa1c64d722db45f7ccc4113a3e2c465d018de6db4d3e7dfe031e8c8a297" -"checksum octavo 0.1.1 (git+https://github.com/libOctavo/octavo.git)" = "" -"checksum octavo-digest 0.1.2 (git+https://github.com/libOctavo/octavo.git)" = "" -"checksum odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "c3df9b730298cea3a1c3faa90b7e2f9df3a9c400d0936d6015e6165734eefcba" -"checksum orbclient 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "06be24afab121c4167c8e9c9781e49b7c232f774815816b67c7c6aa7fc503cf1" -"checksum orbfont 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dfbc851e5c24c3cf1e16ec5222f868f3362d2b7493d0b53051fe2669267a2" -"checksum orbimage 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c3b031607ef7a3c562949dfb595b1ea2b2d697b14544af407242a52dce811a6f" -"checksum orbtk 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "2bca50ac6874107a922dd26dc79889b963afce69075940463ce026b5281bf9f1" -"checksum pager 0.1.0 (git+https://github.com/redox-os/libpager.git)" = "" -"checksum peg 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a85e13cbc4888df1091443e418a772c94163ab5a9cfcfe57d7fcf6ab1057b3c2" -"checksum permutate 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b4ba980af238a6d6fcc0df53fe0d7920376bc4ce2c6ce298992891a230b47a8" -"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" -"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" -"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" -"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum pkgutils 0.1.0 (git+https://github.com/redox-os/pkgutils.git)" = "" -"checksum png 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "06208e2ee243e3118a55dda9318f821f206d8563fb8d4df258767f8e62bb0997" -"checksum png 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3cb773e9a557edb568ce9935cf783e3cdcabe06a9449d41b3e5506d88e582c82" -"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" -"checksum ransid 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e870a7ce03758d35a3b71e8cf07a38d84249aa545a49e8a7515afb0c12d33727" -"checksum raw-cpuid 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13b844e4049605ff38fed943f5c7b2c691fad68d9d5bf074d2720554c4e48246" -"checksum raw-cpuid 3.0.0 (git+https://github.com/gz/rust-cpuid)" = "" -"checksum rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8c83adcb08e5b922e804fe1918142b422602ef11f2fd670b0b52218cb5984a20" -"checksum rayon-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "767d91bacddf07d442fe39257bf04fd95897d1c47c545d009f6beb03efd038f8" -"checksum redox_event 0.1.0 (git+https://github.com/redox-os/event.git)" = "" -"checksum redox_event 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "98e1a40d38f45a3ad65fd088640eeee7b215adcd73041b9f94b92204cca9572a" -"checksum redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "29dbdfd4b9df8ab31dec47c6087b7b13cbf4a776f335e4de8efba8288dda075b" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457" -"checksum resize 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e8f5c5cf4d79776ed121e1c5052718b4bb06d2b48049144a2f0e5ad613b608e" -"checksum ring 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "621adad0185f587ad058bbecededfa2413f5f2e999563bc96349dead9e00d25c" -"checksum ropey 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ffbce36196db96680b526bc2e2e27f23003e5ffab07271a176646c26dd0028b" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" -"checksum rustls 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fcfb2a577b14dca9caf13e6c6aa86d61158aa677347fbc155e5a1dac0f3b718f" -"checksum rusttype 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c64ffc93b0cc5a6f5e5e84da2a4082b0271e0a1dd76e821bdac570bda7797e" -"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" -"checksum scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef399c8893e8cb7aa9696e895427fab3a6bf265977bb96e126f24ddd2cda85a" -"checksum scroll 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39c82d0508f6a56bdb409031382d62e9fa7f5e198fa04dfc06a7a96f1dfc101d" -"checksum sdl2 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c366cfa1f22d001774214ce2fb13f369af760b016bc79cc62d7f5ae15c00fea" -"checksum sdl2-sys 0.27.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8d9f87e3d948f94f2d8688970422f49249c20e97f8f3aad76cb8729901d4eb10" -"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" -"checksum serde 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)" = "c97b18e9e53de541f11e497357d6c5eaeb39f0cb9c8734e274abe4935f6991fa" -"checksum serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" -"checksum serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af" -"checksum serde 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3b46a59dd63931010fdb1d88538513f3279090d88b5c22ef4fe8440cfffcc6e3" -"checksum serde_codegen 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c5d8a33087d8984f9535daa62a6498a08f6476050b00ab9339dd847e4c25cc" -"checksum serde_codegen_internals 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "afad7924a009f859f380e4a2e3a509a845c2ac66435fcead74a4d983b21ae806" -"checksum serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc888bd283bd2420b16ad0d860e35ad8acb21941180a83a189bb2046f9d00400" -"checksum serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "ce44e5f4264b39e9d29c875357b7cc3ebdfb967bb9e22bfb5e44ffa400af5306" -"checksum serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "978fd866f4d4872084a81ccc35e275158351d3b9fe620074e7d7504b816b74ba" -"checksum serde_derive 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6c06b68790963518008b8ae0152d48be4bbbe77015d2c717f6282eea1824be9a" -"checksum serde_derive_internals 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "021c338d22c7e30f957a6ab7e388cb6098499dda9fd4ba1661ee074ca7a180d1" -"checksum serde_json 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b5aaee47e038bf9552d30380d3973fff2593ee0a76d81ad4c581f267cdcadf36" -"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" -"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" -"checksum smallstring 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30950abdb5b38f56a0e181ae56ed64a539b64fa77ea6325147203dc7faeb087f" -"checksum smallvec 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4f8266519bc1d17d0b5b16f6c21295625d562841c708f6376f49028a43e9c11e" -"checksum spin 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1d16a26e2b789f86aabddbe91cb82ee2e822beb8a59840d631941b625ef77e53" -"checksum static-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6da6a96247d4b372d3ed90dec2c129ab57c934359ac4c6adbaa5871cd0737437" -"checksum stb_truetype 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21b5c3b588a493a477e0d99769ee091b3627625f9ba4bdd882e6b4b0b0958805" -"checksum string_cache 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d192db2123fac37399e1ca61557904a5c3fb6fc24c73d2e47b15d20dc32470" -"checksum string_cache_codegen 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0c9dfe1a7c8bba1ecb90730d269fdc08afe93d23c28dd6c4aa5cabd79a05a05e" -"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" -"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum syn 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)" = "58fd09df59565db3399efbba34ba8a2fec1307511ebd245d0061ff9d42691673" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum tar 0.4.11 (git+https://github.com/redox-os/tar-rs.git)" = "" -"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" -"checksum tendril 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4ce04c250d202db8004921e3d3bc95eaa4f2126c6937a428ae39d12d0e38df62" -"checksum termion 1.3.0 (git+https://github.com/redox-os/termion.git)" = "" -"checksum termion 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b41865823fb8c7873ff869893219b3188e7fcd66c10effb97f2b2f63ea98681" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a" -"checksum thread-scoped 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14387dce246d09efe184c8ebc34d9db5c0672a908b2f50efc53359ae13d5ae68" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7" -"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3" -"checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4" -"checksum toml 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bd86ad9ebee246fdedd610e0f6d0587b754a3d81438db930a244d0480ed7878f" -"checksum toml 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3063405db158de3dce8efad5fc89cf1baffb9501a3647dc9505ba109694ce31f" -"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" -"checksum typenum 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f06b0aa9c30a626496836e8de28bd2910cf6c8614e9579c9f8644b0a5d8fb0f5" -"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" -"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" -"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" -"checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3" -"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" -"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" -"checksum untrusted 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "193df64312e3515fd983ded55ad5bcaa7647a035804828ed757e832ce6029ef3" -"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e" -"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" -"checksum users 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7ae8fdf783cb9652109c99886459648feb92ecc749e6b8e7930f6decba74c7c" -"checksum userutils 0.1.0 (git+https://github.com/redox-os/userutils.git)" = "" -"checksum utf-8 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9aee9ba280438b56d1ebc5329f2094f0ff457f811eeeff0b278d75aa99db400" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum version-compare 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cb766fdc689f3a5e38b2a0eb9dff9ac4a8961c09bb99064ecf88702a39b1992e" -"checksum version_check 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f2edadb5308f31d97771a678c33df28f18d04f61de3fe21b9452f37854eb6c08" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c66c0b9792f0a765345452775f3adbd28dde9d33f30d13e5dcc5ae17cf6f3780" -"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" -"checksum webpki 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4155c3a648038ca6b3568ab34e7da1866592ef40b2543fea412461364ef3cbfc" -"checksum webpki-roots 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f611ac968bda097564945980dfcbb840fb6e0380b9d9d34ac6e4c6067ecb3060" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum windows-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d8570474f84367116f48f9fb2ae3e0347600029909096a15a5e6509bd4a03c50" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum x11 2.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab7c9c8fcd61c1453aa7506d45be2fa916512f0c4ec985ef20bba3d575a23a6" -"checksum x86 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "127728f29f7cfb243a9264c80fc7e57bd1abb3ab015850b05736efda2abe5859" -"checksum xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5f04de8a1346489a2f9e9bd8526b73d135ec554227b17568456e86aa35b6f3fc" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 5513d32..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,74 +0,0 @@ -[workspace] -exclude = ["cookbook"] -members = [ - "docgen", - "drivers/ahcid", - "drivers/alxd", - "drivers/bgad", - "drivers/e1000d", - "drivers/nvmed", - "drivers/pcid", - "drivers/ps2d", - "drivers/rtl8168d", - "drivers/vboxd", - "drivers/vesad", - "drivers/xhcid", - "installer", - "kernel", - "libs/event", - "libs/extra", - "libs/jpeg-decoder", - "libs/mio", - "libs/orbclient", - "libs/orbfont", - "libs/orbimage", - "libs/orbtk", - "libs/pager", - #TODO "libs/ralloc", - "libs/ransid", - "libs/same-file", - "libs/syscall", - "libs/tar", - "libs/termion", - "programs/acid", - "programs/binutils", - "programs/contain", - "programs/coreutils", - "programs/extrautils", - "programs/games", - "programs/init", - "programs/ion", - "programs/netutils", - "programs/orbterm", - "programs/orbutils", - "programs/pkgutils", - "programs/smith", - "programs/sodium", - "programs/timeout", - "programs/userutils", - "schemes/ethernetd", - "schemes/ipd", - "schemes/orbital", - "schemes/ptyd", - "schemes/randd", - "schemes/redoxfs", - "schemes/tcpd", - "schemes/udpd" -] - -[replace] -"extra:0.1.0" = { path = "libs/extra" } -"jpeg-decoder:0.1.12" = { path = "libs/jpeg-decoder" } -"mio:0.6.2" = { path = "libs/mio" } -"orbclient:0.3.4" = { path = "libs/orbclient" } -"orbfont:0.1.8" = { path = "libs/orbfont" } -"orbimage:0.1.15" = { path = "libs/orbimage" } -"orbtk:0.2.19" = { path = "libs/orbtk" } -"pager:0.1.0" = { path = "libs/pager" } -"ralloc:1.0.0" = { path = "libs/ralloc" } -"ransid:0.2.7" = { path = "libs/ransid" } -"redox_event:0.1.0" = { path = "libs/event" } -"redox_syscall:0.1.17" = { path = "libs/syscall" } -"same-file:0.1.2" = { path = "libs/same-file" } -"tar:0.4.11" = { path = "libs/tar" } -"termion:1.3.0" = { path = "libs/termion" } diff --git a/Makefile b/Makefile index 461c1fa..7eb8525 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,8 @@ live: build/livedisk.bin iso: build/livedisk.iso clean: - cargo clean - cargo clean --manifest-path rust/src/libcollections/Cargo.toml - cargo clean --manifest-path rust/src/libstd/Cargo.toml + cargo clean --manifest-path kernel/Cargo.toml -$(FUMOUNT) build/filesystem/ || true - rm -rf initfs/bin - rm -rf filesystem/bin filesystem/sbin filesystem/ui/bin rm -rf build update: @@ -35,12 +31,6 @@ include mk/virtualbox.mk # Kernel recipes include mk/kernel.mk -# Userspace recipes -include mk/userspace/mod.mk - -# Documentation -include mk/doc.mk - # Filesystem recipes include mk/initfs.mk include mk/filesystem.mk diff --git a/bootloader b/bootloader index 5e5e080..787f018 160000 --- a/bootloader +++ b/bootloader @@ -1 +1 @@ -Subproject commit 5e5e080d618db036c632e096bdf6ce5c77b33bae +Subproject commit 787f0184fa96a227e51a7ce083a29b06f8945fd8 diff --git a/cookbook b/cookbook index 4a18e61..0506e36 160000 --- a/cookbook +++ b/cookbook @@ -1 +1 @@ -Subproject commit 4a18e61514133017e31d67d31931b1bee621f0c2 +Subproject commit 0506e3602e7e59de94a0e6c200d9aef82fe8e82c diff --git a/docgen b/docgen deleted file mode 160000 index 52fb886..0000000 --- a/docgen +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 52fb8863efdd0862b2439f87faff2457b43cac62 diff --git a/drivers b/drivers deleted file mode 160000 index 15675ea..0000000 --- a/drivers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 15675ea9c3de8b552743f83ec2f9a7bbba538c15 diff --git a/filesystem.toml b/filesystem.toml new file mode 100644 index 0000000..d876abe --- /dev/null +++ b/filesystem.toml @@ -0,0 +1,175 @@ +# This is the default configuration file + +# General settings +[general] +# Do not prompt if settings are not defined +prompt = false +sysroot = "build/filesystem" + +# Package settings +[packages] +acid = {} +binutils = {} +contain = {} +coreutils = {} +drivers = {} +extrautils = {} +games = {} +init = {} +installer = {} +ion = {} +lua = {} +netstack = {} +netutils = {} +orbdata = {} +orbital = {} +orbterm = {} +orbutils = {} +#pixelcannon = {} +pkgutils = {} +ptyd = {} +randd = {} +redoxfs = {} +smith = {} +#sodium = {} +userutils = {} + +# User settings +[users.root] +# Password is set to "password" +password = "$argon2i$m=4096,t=10,p=1$Tnc4UVV0N00$ML9LIOujd3nmAfkAwEcSTMPqakWUF0OUiLWrIy0nGLk" +uid = 0 +gid = 0 +name = "root" +home = "/root" + +[users.user] +# Password is unset +password = "" + +[[files]] +path = "/etc/init.d/00_base" +data = """ +randd +ptyd +pcid /etc/pcid.toml +""" + +[[files]] +path = "/etc/init.d/10_net" +data = """ +ethernetd +ipd +tcpd +udpd +dhcpd -b +""" + +[[files]] +path = "/etc/init.d/20_orbital" +data = """ +orbital display:3/activate /ui/bin/orblogin /ui/bin/launcher +""" + +[[files]] +path = "/etc/init.d/30_console" +data = """ +getty display:2 +getty debug: -J +""" + +[[files]] +path = "/etc/net/dns" +data = "208.67.222.222" + +[[files]] +path = "/etc/net/ip" +data = "10.0.2.15" + +[[files]] +path = "/etc/net/ip_router" +data = "10.0.2.2" + +[[files]] +path = "/etc/net/ip_subnet" +data = "255.255.255.0" + +[[files]] +path = "/etc/net/mac" +data = "00.00.00.00.00.00" + +[[files]] +path = "/etc/pkg.d/50_redox" +data = "https://static.redox-os.org/pkg" + +[[files]] +path = "/etc/group" +data = "sudo;1;user" + +[[files]] +path = "/etc/hostname" +data = "redox" + +[[files]] +path = "/etc/issue" +data = """ +########## Redox OS ########## +# Login with the following: # +# `user` # +# `root`:`password` # +############################## + +""" + +[[files]] +path = "/etc/motd" +data = """ +Welcome to Redox OS! + +""" + +[[files]] +path = "/etc/pcid.toml" +data = """ +[[drivers]] +name = "82543GC NIC" +class = 2 +vendor = 32902 +device = 4100 +command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] + +[[drivers]] +name = "82540EM NIC" +class = 2 +vendor = 32902 +device = 4110 +command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] + +[[drivers]] +name = "82545EM NIC" +class = 2 +vendor = 32902 +device = 4111 +command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] + +[[drivers]] +name = "82579V NIC" +class = 2 +vendor = 32902 +device = 5379 +command = ["e1000d", "$NAME", "$BAR0", "$IRQ"] + +[[drivers]] +name = "RTL8168 NIC" +class = 2 +vendor = 4332 +device = 33128 +command = ["rtl8168d", "$NAME", "$BAR2", "$IRQ"] + +[[drivers]] +name = "XHCI" +class = 12 +subclass = 3 +interface = 48 +command = ["xhcid", "$NAME", "$BAR0", "$IRQ"] +""" diff --git a/filesystem/etc/group b/filesystem/etc/group deleted file mode 100644 index 62fcd49..0000000 --- a/filesystem/etc/group +++ /dev/null @@ -1 +0,0 @@ -sudo;1;user diff --git a/filesystem/etc/hostname b/filesystem/etc/hostname deleted file mode 100644 index 5e07ae0..0000000 --- a/filesystem/etc/hostname +++ /dev/null @@ -1 +0,0 @@ -redox diff --git a/filesystem/etc/init.d/00_base b/filesystem/etc/init.d/00_base deleted file mode 100644 index d34f472..0000000 --- a/filesystem/etc/init.d/00_base +++ /dev/null @@ -1,3 +0,0 @@ -/sbin/randd -/sbin/ptyd -/sbin/pcid /etc/pcid.toml diff --git a/filesystem/etc/init.d/10_net b/filesystem/etc/init.d/10_net deleted file mode 100644 index 21de468..0000000 --- a/filesystem/etc/init.d/10_net +++ /dev/null @@ -1,5 +0,0 @@ -/sbin/ethernetd -/sbin/ipd -/sbin/tcpd -/sbin/udpd -dhcpd -b diff --git a/filesystem/etc/init.d/20_orbital b/filesystem/etc/init.d/20_orbital deleted file mode 100644 index 583ebd1..0000000 --- a/filesystem/etc/init.d/20_orbital +++ /dev/null @@ -1 +0,0 @@ -/sbin/orbital display:3/activate /ui/bin/orblogin /ui/bin/launcher diff --git a/filesystem/etc/init.d/30_console b/filesystem/etc/init.d/30_console deleted file mode 100644 index c981568..0000000 --- a/filesystem/etc/init.d/30_console +++ /dev/null @@ -1,2 +0,0 @@ -getty display:2 -getty debug: -J diff --git a/filesystem/etc/installer.toml b/filesystem/etc/installer.toml deleted file mode 100644 index 34347d2..0000000 --- a/filesystem/etc/installer.toml +++ /dev/null @@ -1,45 +0,0 @@ -# This is the default configuration file - -# General settings -[general] -# Do not prompt if settings are not defined -prompt = false - -# Package settings -[packages] -coreutils = {} -extrautils = {} -ion = {} -netutils = {} -pkgutils = {} -tar = {} -userutils = {} - -[[files]] -path = "/etc/net/dns" -data = "208.67.222.222" - -[[files]] -path = "/etc/net/ip" -data = "10.0.2.15" - -[[files]] -path = "/etc/net/ip_router" -data = "10.0.2.2" - -[[files]] -path = "/etc/net/ip_subnet" -data = "255.255.255.0" - -[[files]] -path = "/etc/pkg.d/50_redox" -data = "https://static.redox-os.org/pkg" - -# User settings -[users.root] -# Password is set to "password" -password = "$argon2i$m=4096,t=10,p=1$Tnc4UVV0N00$ML9LIOujd3nmAfkAwEcSTMPqakWUF0OUiLWrIy0nGLk" -uid = 0 -gid = 0 -name = "root" -home = "/root" diff --git a/filesystem/etc/issue b/filesystem/etc/issue deleted file mode 100644 index 6a963d8..0000000 --- a/filesystem/etc/issue +++ /dev/null @@ -1,6 +0,0 @@ -########## Redox OS ########## -# Login with the following: # -# `user` # -# `root`:`password` # -############################## - diff --git a/filesystem/etc/motd b/filesystem/etc/motd deleted file mode 100644 index 5cd097a..0000000 --- a/filesystem/etc/motd +++ /dev/null @@ -1,2 +0,0 @@ -Welcome to Redox OS! - diff --git a/filesystem/etc/net/dns b/filesystem/etc/net/dns deleted file mode 100644 index 85e3287..0000000 --- a/filesystem/etc/net/dns +++ /dev/null @@ -1 +0,0 @@ -208.67.222.222 diff --git a/filesystem/etc/net/ip b/filesystem/etc/net/ip deleted file mode 100644 index b86c8a7..0000000 --- a/filesystem/etc/net/ip +++ /dev/null @@ -1 +0,0 @@ -10.0.2.15 diff --git a/filesystem/etc/net/ip_router b/filesystem/etc/net/ip_router deleted file mode 100644 index 2e66646..0000000 --- a/filesystem/etc/net/ip_router +++ /dev/null @@ -1 +0,0 @@ -10.0.2.2 diff --git a/filesystem/etc/net/ip_subnet b/filesystem/etc/net/ip_subnet deleted file mode 100644 index d30f9e9..0000000 --- a/filesystem/etc/net/ip_subnet +++ /dev/null @@ -1 +0,0 @@ -255.255.255.0 diff --git a/filesystem/etc/net/mac b/filesystem/etc/net/mac deleted file mode 100644 index f02dd3e..0000000 --- a/filesystem/etc/net/mac +++ /dev/null @@ -1 +0,0 @@ -00.00.00.00.00.00 diff --git a/filesystem/etc/passwd b/filesystem/etc/passwd deleted file mode 100644 index 7baaf91..0000000 --- a/filesystem/etc/passwd +++ /dev/null @@ -1,2 +0,0 @@ -root;$argon2i$m=4096,t=10,p=1$Tnc4UVV0N00$ML9LIOujd3nmAfkAwEcSTMPqakWUF0OUiLWrIy0nGLk;0;0;root;/root;/bin/ion -user;;1000;1000;user;/home/user;/bin/ion diff --git a/filesystem/etc/pcid.toml b/filesystem/etc/pcid.toml deleted file mode 100644 index ca097ce..0000000 --- a/filesystem/etc/pcid.toml +++ /dev/null @@ -1,41 +0,0 @@ -[[drivers]] -name = "82543GC NIC" -class = 2 -vendor = 32902 -device = 4100 -command = ["/sbin/e1000d", "$NAME", "$BAR0", "$IRQ"] - -[[drivers]] -name = "82540EM NIC" -class = 2 -vendor = 32902 -device = 4110 -command = ["/sbin/e1000d", "$NAME", "$BAR0", "$IRQ"] - -[[drivers]] -name = "82545EM NIC" -class = 2 -vendor = 32902 -device = 4111 -command = ["/sbin/e1000d", "$NAME", "$BAR0", "$IRQ"] - -[[drivers]] -name = "82579V NIC" -class = 2 -vendor = 32902 -device = 5379 -command = ["/sbin/e1000d", "$NAME", "$BAR0", "$IRQ"] - -[[drivers]] -name = "RTL8168 NIC" -class = 2 -vendor = 4332 -device = 33128 -command = ["/sbin/rtl8168d", "$NAME", "$BAR2", "$IRQ"] - -[[drivers]] -name = "XHCI" -class = 12 -subclass = 3 -interface = 48 -command = ["/sbin/xhcid", "$NAME", "$BAR0", "$IRQ"] diff --git a/filesystem/etc/pkg.d/50_redox b/filesystem/etc/pkg.d/50_redox deleted file mode 100644 index 4048482..0000000 --- a/filesystem/etc/pkg.d/50_redox +++ /dev/null @@ -1 +0,0 @@ -https://static.redox-os.org/pkg diff --git a/filesystem/home/user/LICENSE b/filesystem/home/user/LICENSE deleted file mode 120000 index 5853aae..0000000 --- a/filesystem/home/user/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../../LICENSE \ No newline at end of file diff --git a/filesystem/home/user/README.md b/filesystem/home/user/README.md deleted file mode 120000 index 8a33348..0000000 --- a/filesystem/home/user/README.md +++ /dev/null @@ -1 +0,0 @@ -../../../README.md \ No newline at end of file diff --git a/filesystem/root/LICENSE b/filesystem/root/LICENSE deleted file mode 120000 index 30cff74..0000000 --- a/filesystem/root/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE \ No newline at end of file diff --git a/filesystem/root/README.md b/filesystem/root/README.md deleted file mode 120000 index fe84005..0000000 --- a/filesystem/root/README.md +++ /dev/null @@ -1 +0,0 @@ -../../README.md \ No newline at end of file diff --git a/filesystem/ui b/filesystem/ui deleted file mode 160000 index d6a5749..0000000 --- a/filesystem/ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d6a5749d61df72e8a339335be5429d843fa401b1 diff --git a/initfs/etc/pcid.toml b/initfs.toml similarity index 56% rename from initfs/etc/pcid.toml rename to initfs.toml index da0c570..c64b788 100644 --- a/initfs/etc/pcid.toml +++ b/initfs.toml @@ -1,3 +1,34 @@ +# This is the default configuration file + +# General settings +[general] +# Do not prompt if settings are not defined +prompt = false +sysroot = "build/initfs" + +# Package settings +[packages] +drivers = {} +init = {} +redoxfs = {} + +[[files]] +path="/etc/init.rc" +data=""" +export PATH initfs:/bin +vesad T T G +stdio display:1 +ps2d +pcid /etc/pcid.toml +redoxfs disk:0 file +cd file: +export PATH file:/bin +run.d /etc/init.d +""" + +[[files]] +path="/etc/pcid.toml" +data=""" [[drivers]] name = "AHCI storage" class = 1 @@ -30,3 +61,4 @@ class = 8 vendor = 33006 device = 51966 command = ["vboxd", "$NAME", "$BAR0", "$BAR1", "$IRQ"] +""" diff --git a/initfs/etc/init.rc b/initfs/etc/init.rc deleted file mode 100644 index bd7548b..0000000 --- a/initfs/etc/init.rc +++ /dev/null @@ -1,9 +0,0 @@ -export PATH initfs:/bin -vesad T T G -stdio display:1 -ps2d -pcid /etc/pcid.toml -redoxfs disk:0 file -cd file: -export PATH file:/bin -run.d /etc/init.d diff --git a/installer b/installer index c2bae24..318e7bb 160000 --- a/installer +++ b/installer @@ -1 +1 @@ -Subproject commit c2bae24835735df247e27093aa43bd1d0fe2a655 +Subproject commit 318e7bb89f37228984bc92976ecdb28adb63dcf0 diff --git a/kernel b/kernel index b3a25bd..62d3f4b 160000 --- a/kernel +++ b/kernel @@ -1 +1 @@ -Subproject commit b3a25bd3a39cd527b80d5ab2ea0da56a91e10540 +Subproject commit 62d3f4bd93c425b263bd9b762632f4601e0ec1c5 diff --git a/krustc.sh b/krustc.sh deleted file mode 100755 index cc510e8..0000000 --- a/krustc.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -have_o=false -for arg in "$@"; do - if [[ "$arg" = "-o" ]]; then - have_o=true - break - fi -done - -args=() -for arg in "$@"; do - if [[ $have_o = true && "$arg" =~ ^extra-filename= ]]; then - unset args[${#args[@]}-1] - elif [[ $have_o = true && "$arg" =~ ^--emit= ]]; then - args+=("--emit=link") - else - args+=("$arg") - fi -done - -RUST_BACKTRACE=1 exec rustc -L build/kernel "${args[@]}" diff --git a/krustdoc.sh b/krustdoc.sh deleted file mode 100755 index 8365834..0000000 --- a/krustdoc.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -RUST_BACKTRACE=1 rustdoc -L build/kernel $* diff --git a/libc-artifacts b/libc-artifacts deleted file mode 160000 index ecd2edd..0000000 --- a/libc-artifacts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ecd2edd8935177cf9f160ae6ec11c22ee3a0a249 diff --git a/libs/event b/libs/event deleted file mode 160000 index 1333e64..0000000 --- a/libs/event +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1333e640e1c58cf3808372147f34e91ff0d7f13c diff --git a/libs/extra b/libs/extra deleted file mode 160000 index 4029320..0000000 --- a/libs/extra +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 402932084acd5fef4812945887ceaaa2ddd5f264 diff --git a/libs/jpeg-decoder b/libs/jpeg-decoder deleted file mode 160000 index 0660fc0..0000000 --- a/libs/jpeg-decoder +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0660fc061973598515ec5d39d03a1bc7e53d68f6 diff --git a/libs/mio b/libs/mio deleted file mode 160000 index a4f7f6a..0000000 --- a/libs/mio +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a4f7f6a4e106fa52702a2dc1c4b2bb747bd0bf9a diff --git a/libs/orbclient b/libs/orbclient deleted file mode 160000 index 4a31537..0000000 --- a/libs/orbclient +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4a3153798bd8d22380f057c07f1e77f8bd9a3cec diff --git a/libs/orbfont b/libs/orbfont deleted file mode 160000 index f554cec..0000000 --- a/libs/orbfont +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f554cec35c9614939590ec5d799d01a593d3c446 diff --git a/libs/orbimage b/libs/orbimage deleted file mode 160000 index cc3b593..0000000 --- a/libs/orbimage +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc3b593a585e339819cafcd8133b22cc6242f84d diff --git a/libs/orbtk b/libs/orbtk deleted file mode 160000 index 9ff1aa4..0000000 --- a/libs/orbtk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9ff1aa42bdd7404585e5cf7f666e2a0f67c4e4be diff --git a/libs/pager b/libs/pager deleted file mode 160000 index 62b01eb..0000000 --- a/libs/pager +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 62b01eba8299143a1a5a78b36d85ab63251462b3 diff --git a/libs/ralloc b/libs/ralloc deleted file mode 160000 index e31a743..0000000 --- a/libs/ralloc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e31a743ec384bac8ecc0bdc82d63ae3534016416 diff --git a/libs/ransid b/libs/ransid deleted file mode 160000 index 20d2db3..0000000 --- a/libs/ransid +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 20d2db307bc9926a33f437b688925ba3a37821c2 diff --git a/libs/same-file b/libs/same-file deleted file mode 160000 index d034b7f..0000000 --- a/libs/same-file +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d034b7f24b4a3eeb56baccbdcbfcdfce95940487 diff --git a/libs/syscall b/libs/syscall deleted file mode 160000 index 8630809..0000000 --- a/libs/syscall +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 863080967dfee40e0a0c74936e43e79161e0aa6e diff --git a/libs/tar b/libs/tar deleted file mode 160000 index 1ccf2ba..0000000 --- a/libs/tar +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1ccf2baf1703bd30807c3f11a8a874ea53af6f74 diff --git a/libs/termion b/libs/termion deleted file mode 160000 index 550b9ea..0000000 --- a/libs/termion +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 550b9ea50a11c838533a0cf2cd9c8f7584927cdb diff --git a/mk/config.mk b/mk/config.mk index b6567e9..db36a11 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -7,7 +7,6 @@ ifeq ($(UNAME),Darwin) ECHO=/bin/echo FUMOUNT=sudo umount export LD=$(ARCH)-elf-ld - export LDFLAGS=--gc-sections export NPROC=sysctl -n hw.ncpu export STRIP=$(ARCH)-elf-strip VB_AUDIO=coreaudio @@ -16,7 +15,6 @@ else ECHO=echo FUMOUNT=fusermount -u export LD=ld - export LDFLAGS=--gc-sections export NPROC=nproc export STRIP=strip VB_AUDIO="pulse" @@ -25,23 +23,14 @@ endif # Automatic variables ROOT=$(PWD) +export INITFS_FOLDER=$(ROOT)/build/initfs export RUST_TARGET_PATH=$(ROOT)/kernel/targets -export CC=$(ROOT)/libc-artifacts/gcc.sh -export CFLAGS=-fno-stack-protector -U_FORTIFY_SOURCE +export XARGO_RUST_SRC=$(ROOT)/rust/src # Kernel variables KTARGET=$(ARCH)-unknown-none KBUILD=build/kernel -KRUSTC=./krustc.sh -KRUSTDOC=./krustdoc.sh -KCARGO=RUSTC="$(KRUSTC)" RUSTDOC="$(KRUSTDOC)" CARGO_INCREMENTAL=1 cargo -KCARGOFLAGS=--target $(KTARGET) --release -- -C soft-float # Userspace variables export TARGET=$(ARCH)-unknown-redox BUILD=build/userspace -export INITFS_FOLDER=$(ROOT)/initfs -RUSTC=$(PWD)/rustc.sh -RUSTDOC=./rustdoc.sh -CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" CARGO_INCREMENTAL=1 cargo -CARGOFLAGS=--target $(TARGET) --release -- -C codegen-units=`$(NPROC)` diff --git a/mk/disk.mk b/mk/disk.mk index bf4996e..d0a8972 100644 --- a/mk/disk.mk +++ b/mk/disk.mk @@ -1,7 +1,7 @@ -build/harddrive.bin: $(KBUILD)/kernel bootloader/$(ARCH)/** build/filesystem.bin +build/harddrive.bin: build/kernel bootloader/$(ARCH)/** build/filesystem.bin nasm -f bin -o $@ -D ARCH_$(ARCH) -ibootloader/$(ARCH)/ bootloader/$(ARCH)/harddrive.asm -build/livedisk.bin: $(KBUILD)/kernel_live bootloader/$(ARCH)/** +build/livedisk.bin: build/kernel_live bootloader/$(ARCH)/** nasm -f bin -o $@ -D ARCH_$(ARCH) -ibootloader/$(ARCH)/ bootloader/$(ARCH)/livedisk.asm build/%.bin.gz: build/%.bin diff --git a/mk/doc.mk b/mk/doc.mk deleted file mode 100644 index 78371f7..0000000 --- a/mk/doc.mk +++ /dev/null @@ -1,13 +0,0 @@ -doc: $(KBUILD)/libkernel.a $(BUILD)/libstd.rlib FORCE - $(KCARGO) doc --target $(KTARGET) --manifest-path kernel/Cargo.toml - $(CARGO) doc --target $(TARGET) --manifest-path rust/src/libstd/Cargo.toml - -ref: FORCE - rm -rf filesystem/ref/ - mkdir -p filesystem/ref/ - #cargo run --manifest-path docgen/Cargo.toml -- programs/binutils/src/bin/ filesystem/ref/ - cargo run --manifest-path docgen/Cargo.toml -- programs/coreutils/src/bin/ filesystem/ref/ - cargo run --manifest-path docgen/Cargo.toml -- programs/extrautils/src/bin/ filesystem/ref/ - cargo run --manifest-path docgen/Cargo.toml -- programs/netutils/src/ filesystem/ref/ - cargo run --manifest-path docgen/Cargo.toml -- programs/pkgutils/src/ filesystem/ref/ - cargo run --manifest-path docgen/Cargo.toml -- programs/userutils/src/ filesystem/ref/ diff --git a/mk/filesystem.mk b/mk/filesystem.mk index d1eb674..cce220b 100644 --- a/mk/filesystem.mk +++ b/mk/filesystem.mk @@ -1,14 +1,14 @@ -build/filesystem.bin: userspace +build/filesystem.bin: filesystem.toml -$(FUMOUNT) build/filesystem/ || true rm -rf $@ build/filesystem/ dd if=/dev/zero of=$@ bs=1048576 count=128 - cargo run --manifest-path schemes/redoxfs/Cargo.toml --quiet --release --bin redoxfs-mkfs $@ + cargo run --manifest-path installer/redoxfs/Cargo.toml --quiet --release --bin redoxfs-mkfs $@ mkdir -p build/filesystem/ - cargo build --manifest-path schemes/redoxfs/Cargo.toml --quiet --release --bin redoxfs - cargo run --manifest-path schemes/redoxfs/Cargo.toml --quiet --release --bin redoxfs -- $@ build/filesystem/ + cargo build --manifest-path installer/redoxfs/Cargo.toml --quiet --release --bin redoxfs + cargo run --manifest-path installer/redoxfs/Cargo.toml --quiet --release --bin redoxfs -- $@ build/filesystem/ sleep 2 pgrep redoxfs - cp -RL filesystem/* build/filesystem/ + cargo run --manifest-path installer/Cargo.toml -- --cookbook=cookbook $< chown -R 0:0 build/filesystem chown -R 1000:1000 build/filesystem/home/user chmod -R uog+rX build/filesystem @@ -30,8 +30,8 @@ build/filesystem.bin: userspace mount: FORCE mkdir -p build/filesystem/ - cargo build --manifest-path schemes/redoxfs/Cargo.toml --quiet --release --bin redoxfs - cargo run --manifest-path schemes/redoxfs/Cargo.toml --quiet --release --bin redoxfs -- build/harddrive.bin build/filesystem/ + cargo build --manifest-path installer/redoxfs/Cargo.toml --quiet --release --bin redoxfs + cargo run --manifest-path installer/redoxfs/Cargo.toml --quiet --release --bin redoxfs -- build/harddrive.bin build/filesystem/ sleep 2 pgrep redoxfs diff --git a/mk/initfs.mk b/mk/initfs.mk index c6b9500..d335f12 100644 --- a/mk/initfs.mk +++ b/mk/initfs.mk @@ -1,17 +1,3 @@ -$(KBUILD)/initfs.tag: initfs/bin/init \ - initfs/bin/ahcid \ - initfs/bin/bgad \ - initfs/bin/nvmed \ - initfs/bin/pcid \ - initfs/bin/ps2d \ - initfs/bin/redoxfs \ - initfs/bin/vboxd \ - initfs/bin/vesad \ - initfs/etc/** - $(KCARGO) clean --manifest-path kernel/Cargo.toml - touch $@ - -initfs/bin/%: programs/%/Cargo.toml programs/%/src/** $(BUILD)/libstd.rlib - mkdir -p initfs/bin - $(CARGO) rustc --manifest-path $< $(CARGOFLAGS) -o $@ - $(STRIP) $@ +build/initfs.tag: initfs.toml + cargo run --manifest-path installer/Cargo.toml -- --cookbook=cookbook $< + touch $@ diff --git a/mk/kernel.mk b/mk/kernel.mk index 5d56370..6b9cc48 100644 --- a/mk/kernel.mk +++ b/mk/kernel.mk @@ -1,16 +1,11 @@ -$(KBUILD)/libcollections.rlib: rust/src/libcollections/Cargo.toml rust/src/libcollections/** - mkdir -p $(KBUILD) - $(KCARGO) rustc --manifest-path $< $(KCARGOFLAGS) -o $@ - cp rust/src/target/$(KTARGET)/release/deps/*.rlib $(KBUILD) +build/libkernel.a: kernel/Cargo.toml kernel/src/** build/initfs.tag + cd kernel && xargo rustc --lib --target $(KTARGET) --release -- -C soft-float --emit link=../$@ -$(KBUILD)/libkernel.a: kernel/Cargo.toml kernel/src/** $(KBUILD)/libcollections.rlib $(KBUILD)/initfs.tag - $(KCARGO) rustc --manifest-path $< --lib $(KCARGOFLAGS) -o $@ +build/libkernel_live.a: kernel/Cargo.toml kernel/src/** build/initfs.tag build/filesystem.bin + cd kernel && xargo rustc --lib --features live --target $(KTARGET) --release -- -C soft-float --emit link=../$@ -$(KBUILD)/libkernel_live.a: kernel/Cargo.toml kernel/src/** $(KBUILD)/libcollections.rlib $(KBUILD)/initfs.tag build/filesystem.bin - $(KCARGO) rustc --manifest-path $< --lib --features live $(KCARGOFLAGS) -o $@ +build/kernel: build/libkernel.a + $(LD) --gc-sections -z max-page-size=0x1000 -T kernel/linkers/$(ARCH).ld -o $@ $< -$(KBUILD)/kernel: $(KBUILD)/libkernel.a - $(LD) $(LDFLAGS) -z max-page-size=0x1000 -T kernel/linkers/$(ARCH).ld -o $@ $< - -$(KBUILD)/kernel_live: $(KBUILD)/libkernel_live.a - $(LD) $(LDFLAGS) -z max-page-size=0x1000 -T kernel/linkers/$(ARCH).ld -o $@ $< +build/kernel_live: build/libkernel_live.a + $(LD) --gc-sections -z max-page-size=0x1000 -T kernel/linkers/$(ARCH).ld -o $@ $< diff --git a/mk/userspace/coreutils.mk b/mk/userspace/coreutils.mk deleted file mode 100644 index 8e330c3..0000000 --- a/mk/userspace/coreutils.mk +++ /dev/null @@ -1,46 +0,0 @@ -coreutils: \ - filesystem/bin/basename \ - filesystem/bin/cat \ - filesystem/bin/chmod \ - filesystem/bin/clear \ - filesystem/bin/cp \ - filesystem/bin/cut \ - filesystem/bin/date \ - filesystem/bin/dd \ - filesystem/bin/df \ - filesystem/bin/du \ - filesystem/bin/echo \ - filesystem/bin/env \ - filesystem/bin/false \ - filesystem/bin/free \ - filesystem/bin/head \ - filesystem/bin/kill \ - filesystem/bin/ln \ - filesystem/bin/ls \ - filesystem/bin/mkdir \ - filesystem/bin/mv \ - filesystem/bin/printenv \ - filesystem/bin/ps \ - filesystem/bin/pwd \ - filesystem/bin/realpath \ - filesystem/bin/reset \ - filesystem/bin/rmdir \ - filesystem/bin/rm \ - filesystem/bin/seq \ - filesystem/bin/shutdown \ - filesystem/bin/sleep \ - filesystem/bin/sort \ - filesystem/bin/tail \ - filesystem/bin/tee \ - filesystem/bin/test \ - filesystem/bin/time \ - filesystem/bin/touch \ - filesystem/bin/true \ - filesystem/bin/wc \ - filesystem/bin/which \ - filesystem/bin/yes - -filesystem/bin/%: programs/coreutils/Cargo.toml programs/coreutils/src/bin/%.rs $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/drivers.mk b/mk/userspace/drivers.mk deleted file mode 100644 index b3d06bc..0000000 --- a/mk/userspace/drivers.mk +++ /dev/null @@ -1,15 +0,0 @@ -drivers: \ - filesystem/sbin/pcid \ - filesystem/sbin/e1000d \ - filesystem/sbin/rtl8168d \ - filesystem/sbin/xhcid - -initfs/bin/%: drivers/%/Cargo.toml drivers/%/src/** $(BUILD)/libstd.rlib - mkdir -p initfs/bin - $(CARGO) rustc --manifest-path $< $(CARGOFLAGS) -o $@ - $(STRIP) $@ - -filesystem/sbin/%: drivers/%/Cargo.toml drivers/%/src/** $(BUILD)/libstd.rlib - mkdir -p filesystem/sbin - $(CARGO) rustc --manifest-path $< $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/extrautils.mk b/mk/userspace/extrautils.mk deleted file mode 100644 index ceb4c17..0000000 --- a/mk/userspace/extrautils.mk +++ /dev/null @@ -1,21 +0,0 @@ -extrautils: \ - filesystem/bin/calc \ - filesystem/bin/cksum \ - filesystem/bin/cur \ - filesystem/bin/grep \ - filesystem/bin/gunzip \ - filesystem/bin/gzip \ - filesystem/bin/less \ - filesystem/bin/man \ - filesystem/bin/mdless \ - filesystem/bin/mtxt \ - filesystem/bin/rem \ - filesystem/bin/resize \ - filesystem/bin/screenfetch \ - filesystem/bin/tar - #filesystem/bin/dmesg filesystem/bin/info filesystem/bin/watch - -filesystem/bin/%: programs/extrautils/Cargo.toml programs/extrautils/src/bin/%.rs $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/installer.mk b/mk/userspace/installer.mk deleted file mode 100644 index 448da59..0000000 --- a/mk/userspace/installer.mk +++ /dev/null @@ -1,7 +0,0 @@ -installer: \ - filesystem/bin/redox_installer - -filesystem/bin/redox_installer: installer/Cargo.toml installer/src/** $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin redox_installer $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/ion.mk b/mk/userspace/ion.mk deleted file mode 100644 index 48161a4..0000000 --- a/mk/userspace/ion.mk +++ /dev/null @@ -1,11 +0,0 @@ -ion: \ - filesystem/bin/ion \ - filesystem/bin/sh - -filesystem/test/ion: programs/ion/Cargo.toml programs/ion/src/** $(BUILD)/libstd.rlib $(BUILD)/libtest.rlib - mkdir -p filesystem/test - $(CARGO) test --no-run --manifest-path $< $(CARGOFLAGS) - cp programs/ion/target/$(TARGET)/release/deps/ion-* $@ - -filesystem/bin/sh: filesystem/bin/ion - cp $< $@ diff --git a/mk/userspace/mod.mk b/mk/userspace/mod.mk deleted file mode 100644 index 4edff9d..0000000 --- a/mk/userspace/mod.mk +++ /dev/null @@ -1,49 +0,0 @@ -userspace: \ - drivers \ - coreutils \ - extrautils \ - installer \ - ion \ - netutils \ - orbutils \ - pkgutils \ - userutils \ - schemes \ - filesystem/bin/acid \ - filesystem/bin/contain \ - filesystem/bin/smith \ - filesystem/bin/timeout \ - filesystem/ui/bin/orbterm \ - filesystem/ui/bin/sodium - -include mk/userspace/coreutils.mk -include mk/userspace/drivers.mk -include mk/userspace/extrautils.mk -include mk/userspace/installer.mk -include mk/userspace/ion.mk -include mk/userspace/netutils.mk -include mk/userspace/orbutils.mk -include mk/userspace/pkgutils.mk -include mk/userspace/schemes.mk -include mk/userspace/userutils.mk - -$(BUILD)/libstd.rlib: rust/src/libstd/Cargo.toml rust/src/libstd/** - mkdir -p $(BUILD) - $(CARGO) rustc --manifest-path $< --features "panic-unwind" $(CARGOFLAGS) -L native=libc-artifacts/usr/lib -o $@ - cp rust/src/target/$(TARGET)/release/deps/*.rlib $(BUILD) - -$(BUILD)/libtest.rlib: rust/src/libtest/Cargo.toml rust/src/libtest/** $(BUILD)/libstd.rlib - mkdir -p $(BUILD) - $(CARGO) rustc --manifest-path $< $(CARGOFLAGS) -L native=libc-artifacts/usr/lib -o $@ - cp rust/src/target/$(TARGET)/release/deps/*.rlib $(BUILD) - -filesystem/bin/%: programs/%/Cargo.toml programs/%/src/** $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ - -filesystem/ui/bin/%: programs/%/Cargo.toml programs/%/src/**.rs $(BUILD)/libstd.rlib - mkdir -p filesystem/ui/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ - diff --git a/mk/userspace/netutils.mk b/mk/userspace/netutils.mk deleted file mode 100644 index eda3602..0000000 --- a/mk/userspace/netutils.mk +++ /dev/null @@ -1,14 +0,0 @@ -netutils: \ - filesystem/bin/dhcpd \ - filesystem/bin/dns \ - filesystem/bin/httpd \ - filesystem/bin/irc \ - filesystem/bin/nc \ - filesystem/bin/ntp \ - filesystem/bin/telnetd \ - filesystem/bin/wget - -filesystem/bin/%: programs/netutils/Cargo.toml programs/netutils/src/%/**.rs $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/orbutils.mk b/mk/userspace/orbutils.mk deleted file mode 100644 index def6d73..0000000 --- a/mk/userspace/orbutils.mk +++ /dev/null @@ -1,15 +0,0 @@ -orbutils: \ - filesystem/ui/bin/browser \ - filesystem/ui/bin/calculator \ - filesystem/ui/bin/character_map \ - filesystem/ui/bin/editor \ - filesystem/ui/bin/file_manager \ - filesystem/ui/bin/launcher \ - filesystem/ui/bin/orblogin \ - filesystem/ui/bin/orbterm \ - filesystem/ui/bin/viewer - -filesystem/ui/bin/%: programs/orbutils/Cargo.toml programs/orbutils/src/%/**.rs $(BUILD)/libstd.rlib - mkdir -p filesystem/ui/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/pkgutils.mk b/mk/userspace/pkgutils.mk deleted file mode 100644 index 156c532..0000000 --- a/mk/userspace/pkgutils.mk +++ /dev/null @@ -1,7 +0,0 @@ -pkgutils: \ - filesystem/bin/pkg - -filesystem/bin/%: programs/pkgutils/Cargo.toml programs/pkgutils/src/*.rs programs/pkgutils/src/bin/%.rs $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/schemes.mk b/mk/userspace/schemes.mk deleted file mode 100644 index b28485f..0000000 --- a/mk/userspace/schemes.mk +++ /dev/null @@ -1,25 +0,0 @@ -schemes: \ - filesystem/sbin/ethernetd \ - filesystem/sbin/ipd \ - filesystem/sbin/orbital \ - filesystem/sbin/ptyd \ - filesystem/sbin/randd \ - filesystem/sbin/redoxfs \ - filesystem/sbin/redoxfs-mkfs \ - filesystem/sbin/tcpd \ - filesystem/sbin/udpd - -initfs/bin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib - mkdir -p initfs/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ - -filesystem/sbin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib - mkdir -p filesystem/sbin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ - -filesystem/sbin/redoxfs-mkfs: schemes/redoxfs/Cargo.toml schemes/redoxfs/src/** $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin redoxfs-mkfs $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/mk/userspace/userutils.mk b/mk/userspace/userutils.mk deleted file mode 100644 index 9b144e0..0000000 --- a/mk/userspace/userutils.mk +++ /dev/null @@ -1,13 +0,0 @@ -userutils: \ - filesystem/bin/getty \ - filesystem/bin/id \ - filesystem/bin/login \ - filesystem/bin/passwd \ - filesystem/bin/su \ - filesystem/bin/sudo \ - filesystem/bin/whoami - -filesystem/bin/%: programs/userutils/Cargo.toml programs/userutils/src/bin/%.rs $(BUILD)/libstd.rlib - mkdir -p filesystem/bin - $(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@ - $(STRIP) $@ diff --git a/paper/redox.tex b/paper/redox.tex deleted file mode 100644 index c458d68..0000000 --- a/paper/redox.tex +++ /dev/null @@ -1,84 +0,0 @@ -\documentclass[11pt]{article} -\usepackage[T1]{fontenc} -\usepackage{amsmath, amsfonts, amssymb, amsthm, url, lmodern, color, graphicx} - -\title{Redox and system calls -- a multi-level kernel space} -\author{Redox OS developers} -\date{\today} - -\begin{document} - \maketitle - - %%% DISCLAIMER %%% - - \begin{titlepage} - \centering \huge\bfseries The following document is an incomplete draft. - \end{titlepage} - - %%% START OF DOCUMENT %%% - - \maketitle - - \begin{abstract} - In this paper, we review Redox's core system call interface. Redox has - multiple levels of kernel space, and the top one consists of a very - minimal system call interface, which we go over here. - \end{abstract} - - \section{Introduction} - TODO - - \section{Executing system calls} - We allow multiplied system calls, a generalized version of concept of - multicalls in the \emph{kqueue} system call. - - Depending on the platform, system calls might be sent through interrupts or - \texttt{sysenter}. What we are really interested in, though, is the state - when we leave user space. - - \begin{description} - \item [\texttt{rax}/\texttt{eax}] stores the pointer to the array of system calls. - \item [\texttt{rbx}/\texttt{ebx}] stores the number of system calls in - this bundle. - \end{description} - - \section{The interface} - Each entry in this system call bundle buffer needs an ABI representation. - We represent the interface for the \emph{core system calls}. - - The representation is as follows: - - \begin{description} - \item [The system call ID] this is an unsigned 16-bit integer - representing which system call is used. - \item [First argument] this 64-bit integer is used as defined by the - system call. - \item [Second argument] this 64-bit integer is used as defined by the - system call. - \end{description} - - The return value of the system call is placed in the respective element. - - \subsection{Access management} - The memory access management is a set of system calls taken pointer and - size, respectively. - - It contains of four calls: - - \begin{description} - \item [Make memory readable]. - \item [Make memory unreadable]. - \item [Make memory writable]. - \item [Make memory unwritable]. - \item [Make memory executable]. - \item [Make memory unexecutable]. - \end{description} - - \subsection{Access management} - - %%% BIBLIOGRAPHY %%% - - \begin{thebibliography}{9} - TODO - \end{thebibliography} -\end{document} diff --git a/programs/acid b/programs/acid deleted file mode 160000 index 99b7633..0000000 --- a/programs/acid +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 99b7633a0a8b23befecb3703f1b7c06603cf7ba4 diff --git a/programs/binutils b/programs/binutils deleted file mode 160000 index ce057ba..0000000 --- a/programs/binutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ce057bac70f18fe7fd004c68e58c07c1cc7174e0 diff --git a/programs/contain/Cargo.toml b/programs/contain/Cargo.toml deleted file mode 100644 index a11d6d0..0000000 --- a/programs/contain/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "contain" -version = "0.1.0" - -[dependencies] -redox_syscall = "0.1" diff --git a/programs/contain/src/chroot.rs b/programs/contain/src/chroot.rs deleted file mode 100644 index edce9ea..0000000 --- a/programs/contain/src/chroot.rs +++ /dev/null @@ -1,172 +0,0 @@ -use syscall; -use syscall::data::{Stat, StatVfs}; -use syscall::error::{Error, EBADF, EINVAL, EPERM, Result}; -use syscall::scheme::Scheme; - -use std::str; -use std::path::PathBuf; - -pub struct ChrootScheme { - root: PathBuf -} - -impl ChrootScheme { - pub fn new(root: PathBuf) -> ChrootScheme { - ChrootScheme { - root: root - } - } - - fn translate(&self, path: &[u8]) -> Result { - let path = str::from_utf8(path).or(Err(Error::new(EINVAL)))?; - let mut translated = self.root.clone(); - translated.push(path.trim_left_matches('/')); - if translated.starts_with(&self.root) { - translated.into_os_string().into_string().or(Err(Error::new(EINVAL))) - } else { - println!("escaped chroot"); - Err(Error::new(EPERM)) - } - } -} - -impl Scheme for ChrootScheme { - fn open(&self, path: &[u8], flags: usize, uid: u32, gid: u32) -> Result { - if uid != 0 { - syscall::setreuid(0, uid as usize)?; - } - if gid != 0 { - syscall::setregid(0, gid as usize)?; - } - let res = syscall::open(&self.translate(path)?, flags); - if uid != 0 { - syscall::setreuid(0, 0).unwrap(); - } - if gid != 0 { - syscall::setregid(0, 0).unwrap(); - } - res - } - - fn chmod(&self, path: &[u8], mode: u16, uid: u32, gid: u32) -> Result { - if uid != 0 { - syscall::setreuid(0, uid as usize)?; - } - if gid != 0 { - syscall::setregid(0, gid as usize)?; - } - let res = syscall::chmod(&self.translate(path)?, mode as usize); - if uid != 0 { - syscall::setreuid(0, 0).unwrap(); - } - if gid != 0 { - syscall::setregid(0, 0).unwrap(); - } - res - } - - fn rmdir(&self, path: &[u8], uid: u32, gid: u32) -> Result { - if uid != 0 { - syscall::setreuid(0, uid as usize)?; - } - if gid != 0 { - syscall::setregid(0, gid as usize)?; - } - let res = syscall::rmdir(&self.translate(path)?); - if uid != 0 { - syscall::setreuid(0, 0).unwrap(); - } - if gid != 0 { - syscall::setregid(0, 0).unwrap(); - } - res - } - - fn unlink(&self, path: &[u8], uid: u32, gid: u32) -> Result { - if uid != 0 { - syscall::setreuid(0, uid as usize)?; - } - if gid != 0 { - syscall::setregid(0, gid as usize)?; - } - let res = syscall::unlink(&self.translate(path)?); - if uid != 0 { - syscall::setreuid(0, 0).unwrap(); - } - if gid != 0 { - syscall::setregid(0, 0).unwrap(); - } - res - } - - /* Resource operations */ - fn dup(&self, old_id: usize, buf: &[u8]) -> Result { - syscall::dup(old_id, buf) - } - - fn read(&self, id: usize, buf: &mut [u8]) -> Result { - syscall::read(id, buf) - } - - fn write(&self, id: usize, buf: &[u8]) -> Result { - syscall::write(id, buf) - } - - fn seek(&self, id: usize, pos: usize, whence: usize) -> Result { - syscall::lseek(id, pos as isize, whence) - } - - fn fcntl(&self, id: usize, cmd: usize, arg: usize) -> Result { - syscall::fcntl(id, cmd, arg) - } - - fn fevent(&self, _id: usize, _flags: usize) -> Result { - //TODO - Err(Error::new(EBADF)) - } - - fn fmap(&self, _id: usize, _offset: usize, _size: usize) -> Result { - //TODO - Err(Error::new(EBADF)) - } - - fn fpath(&self, id: usize, buf: &mut [u8]) -> Result { - let count = syscall::fpath(id, buf)?; - - let translated = { - let path = str::from_utf8(&buf[.. count]).or(Err(Error::new(EINVAL)))?; - let translated = path.to_string().replace(self.root.to_str().ok_or(Error::new(EINVAL))?, ""); - format!("file:{}", translated.trim_left_matches('/')) - }; - - let path = translated.as_bytes(); - - let mut i = 0; - while i < buf.len() && i < path.len() { - buf[i] = path[i]; - i += 1; - } - - Ok(i) - } - - fn fstat(&self, id: usize, stat: &mut Stat) -> Result { - syscall::fstat(id, stat) - } - - fn fstatvfs(&self, id: usize, stat: &mut StatVfs) -> Result { - syscall::fstatvfs(id, stat) - } - - fn fsync(&self, id: usize) -> Result { - syscall::fsync(id) - } - - fn ftruncate(&self, id: usize, len: usize) -> Result { - syscall::ftruncate(id, len) - } - - fn close(&self, id: usize) -> Result { - syscall::close(id) - } -} diff --git a/programs/contain/src/main.rs b/programs/contain/src/main.rs deleted file mode 100644 index 0cd1e01..0000000 --- a/programs/contain/src/main.rs +++ /dev/null @@ -1,97 +0,0 @@ -extern crate syscall; - -use syscall::scheme::Scheme; - -use std::{env, fs,thread}; -use std::io::{stderr, Write}; -use std::os::unix::process::CommandExt; -use std::path::Path; -use std::process::{self, Command}; - -use self::chroot::ChrootScheme; - -mod chroot; - -fn usage() -> ! { - write!(stderr(), "contain root cmd args..\n").unwrap(); - process::exit(1); -} - -fn enter(root: &Path, cmd: &str, args: &[String]) { - let names = [ - "pty", - "rand", - "tcp", - "udp" - ]; - - let mut name_ptrs = Vec::new(); - for name in names.iter() { - name_ptrs.push([name.as_ptr() as usize, name.len()]); - } - - let new_ns = syscall::mkns(&name_ptrs).unwrap(); - - let root_canon = fs::canonicalize(root).unwrap(); - let root_thread = thread::spawn(move || { - syscall::setrens(-1isize as usize, new_ns).unwrap(); - let scheme_fd = syscall::open(":file", syscall::O_CREAT | syscall::O_RDWR | syscall::O_CLOEXEC).unwrap(); - syscall::setrens(-1isize as usize, syscall::getns().unwrap()).unwrap(); - - let chroot_scheme = ChrootScheme::new(root_canon); - loop { - let mut packet = syscall::Packet::default(); - if syscall::read(scheme_fd, &mut packet).unwrap() == 0 { - break; - } - chroot_scheme.handle(&mut packet); - syscall::write(scheme_fd, &packet).unwrap(); - } - - let _ = syscall::close(scheme_fd); - }); - - let pid = unsafe { syscall::clone(0).unwrap() }; - if pid == 0 { - syscall::setrens(new_ns, new_ns).unwrap(); - - println!("Container {}: enter: {}", new_ns, cmd); - - let mut command = Command::new(&cmd); - for arg in args { - command.arg(&arg); - } - command.current_dir("/"); - - let err = command.exec(); - - panic!("contain: failed to launch {}: {}", cmd, err); - } else { - let mut status = 0; - syscall::waitpid(pid, &mut status, 0).unwrap(); - - loop { - let mut c_status = 0; - let c_pid = syscall::waitpid(0, &mut c_status, syscall::WNOHANG).unwrap(); - if c_pid == 0 { - break; - } else { - println!("Container zombie {}: {:X}", c_pid, c_status); - } - } - - println!("Container {}: exit: {:X}", new_ns, status); - } -} - -pub fn main() { - let mut args = env::args().skip(1); - - if let Some(root) = args.next() { - let cmd = args.next().unwrap_or("login".to_string()); - let args: Vec = args.collect(); - enter(Path::new(&root), &cmd, &args); - } else { - usage(); - } -} diff --git a/programs/coreutils b/programs/coreutils deleted file mode 160000 index bc953d8..0000000 --- a/programs/coreutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc953d8f25da20bd691b1855bc382cdd00a8603b diff --git a/programs/extrautils b/programs/extrautils deleted file mode 160000 index 3f7d502..0000000 --- a/programs/extrautils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f7d5027883169385086ea674be4127e7962e5b9 diff --git a/programs/games b/programs/games deleted file mode 160000 index c4984dc..0000000 --- a/programs/games +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c4984dc276bf5776f544b5f9f6996330e3ca4b51 diff --git a/programs/init b/programs/init deleted file mode 160000 index 032a45c..0000000 --- a/programs/init +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 032a45c55242aebaa9f6a03fa9d11da881bfcb1f diff --git a/programs/ion b/programs/ion deleted file mode 160000 index ae73d27..0000000 --- a/programs/ion +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae73d27b07db96c6e6520c559ba03c117e048b43 diff --git a/programs/netutils b/programs/netutils deleted file mode 160000 index 074c900..0000000 --- a/programs/netutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 074c900be31586f405cc46503a807e7ab8a7a2bb diff --git a/programs/orbterm b/programs/orbterm deleted file mode 160000 index 4143dcf..0000000 --- a/programs/orbterm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4143dcf160648a048d579553ab29ba18fb47c23c diff --git a/programs/orbutils b/programs/orbutils deleted file mode 160000 index 99c5e04..0000000 --- a/programs/orbutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 99c5e04e24084244b5d02b29ee95041b4d02bbf6 diff --git a/programs/pkgutils b/programs/pkgutils deleted file mode 160000 index b9c10c9..0000000 --- a/programs/pkgutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b9c10c980e1724270b7e90d3c2d4999c398814b8 diff --git a/programs/smith b/programs/smith deleted file mode 160000 index 9e39ff1..0000000 --- a/programs/smith +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9e39ff178cf9abb5b09812b377082f3a5bb847b7 diff --git a/programs/sodium b/programs/sodium deleted file mode 160000 index 86fc766..0000000 --- a/programs/sodium +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 86fc766160cf2a0996f1ca6de6e301c35807f7fb diff --git a/programs/timeout/Cargo.toml b/programs/timeout/Cargo.toml deleted file mode 100644 index 9ca5a42..0000000 --- a/programs/timeout/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "timeout" -version = "0.1.0" -authors = ["Jeremy Soller "] - -[dependencies] -redox_event = { git = "https://github.com/redox-os/event.git" } -redox_syscall = "0.1" diff --git a/programs/timeout/src/main.rs b/programs/timeout/src/main.rs deleted file mode 100644 index baa7692..0000000 --- a/programs/timeout/src/main.rs +++ /dev/null @@ -1,44 +0,0 @@ -extern crate event; -extern crate syscall; - -use event::EventQueue; -use std::fs::File; -use std::io::{Result, Read, Write}; -use std::mem; -use std::os::unix::io::AsRawFd; -use syscall::data::TimeSpec; -use syscall::flag::CLOCK_MONOTONIC; - -fn main() { - let mut event_queue = EventQueue::::new().expect("timeout: failed to create event queue"); - - let path = format!("time:{}", CLOCK_MONOTONIC); - - let mut file = File::open(&path).expect(&format!("timeout: failed to open {}", path)); - - let mut timeout = TimeSpec::default(); - file.read(&mut timeout).unwrap(); - println!("Current: {:?}", timeout); - - timeout.tv_sec += 1; - println!("Setting timeout: {:?}", timeout); - file.write(&timeout).unwrap(); - - event_queue.add(file.as_raw_fd(), move |_count: usize| -> Result> { - let mut time = TimeSpec::default(); - if file.read(&mut time)? >= mem::size_of::() { - if time.tv_sec > timeout.tv_sec - || (time.tv_sec == timeout.tv_sec && time.tv_nsec >= timeout.tv_nsec ) - { - return Ok(Some(time)) - } - } - Ok(None) - }).expect("timeout: failed to poll time"); - - event_queue.trigger_all(0).expect("timeout: failed to trigger events"); - - let time = event_queue.run().expect("timeout: failed to run event loop"); - - println!("Time passed: {:?}", time); -} diff --git a/programs/userutils b/programs/userutils deleted file mode 160000 index 3ca1891..0000000 --- a/programs/userutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3ca18917f88130f4734bcb4643a410e62e6cb24c diff --git a/res/fonts/DejaVuSansMono-Bold.ttf b/res/fonts/DejaVuSansMono-Bold.ttf deleted file mode 100644 index 8184ced..0000000 Binary files a/res/fonts/DejaVuSansMono-Bold.ttf and /dev/null differ diff --git a/res/fonts/DejaVuSansMono-BoldOblique.ttf b/res/fonts/DejaVuSansMono-BoldOblique.ttf deleted file mode 100644 index 754dca7..0000000 Binary files a/res/fonts/DejaVuSansMono-BoldOblique.ttf and /dev/null differ diff --git a/res/fonts/DejaVuSansMono-LICENSE b/res/fonts/DejaVuSansMono-LICENSE deleted file mode 100644 index df52c17..0000000 --- a/res/fonts/DejaVuSansMono-LICENSE +++ /dev/null @@ -1,187 +0,0 @@ -Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. -Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) - - -Bitstream Vera Fonts Copyright ------------------------------- - -Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is -a trademark of Bitstream, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of the fonts accompanying this license ("Fonts") and associated -documentation files (the "Font Software"), to reproduce and distribute the -Font Software, including without limitation the rights to use, copy, merge, -publish, distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to the -following conditions: - -The above copyright and trademark notices and this permission notice shall -be included in all copies of one or more of the Font Software typefaces. - -The Font Software may be modified, altered, or added to, and in particular -the designs of glyphs or characters in the Fonts may be modified and -additional glyphs or characters may be added to the Fonts, only if the fonts -are renamed to names not containing either the words "Bitstream" or the word -"Vera". - -This License becomes null and void to the extent applicable to Fonts or Font -Software that has been modified and is distributed under the "Bitstream -Vera" names. - -The Font Software may be sold as part of a larger software package but no -copy of one or more of the Font Software typefaces may be sold by itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME -FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING -ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE -FONT SOFTWARE. - -Except as contained in this notice, the names of Gnome, the Gnome -Foundation, and Bitstream Inc., shall not be used in advertising or -otherwise to promote the sale, use or other dealings in this Font Software -without prior written authorization from the Gnome Foundation or Bitstream -Inc., respectively. For further information, contact: fonts at gnome dot -org. - -Arev Fonts Copyright ------------------------------- - -Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the fonts accompanying this license ("Fonts") and -associated documentation files (the "Font Software"), to reproduce -and distribute the modifications to the Bitstream Vera Font Software, -including without limitation the rights to use, copy, merge, publish, -distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to -the following conditions: - -The above copyright and trademark notices and this permission notice -shall be included in all copies of one or more of the Font Software -typefaces. - -The Font Software may be modified, altered, or added to, and in -particular the designs of glyphs or characters in the Fonts may be -modified and additional glyphs or characters may be added to the -Fonts, only if the fonts are renamed to names not containing either -the words "Tavmjong Bah" or the word "Arev". - -This License becomes null and void to the extent applicable to Fonts -or Font Software that has been modified and is distributed under the -"Tavmjong Bah Arev" names. - -The Font Software may be sold as part of a larger software package but -no copy of one or more of the Font Software typefaces may be sold by -itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL -TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -Except as contained in this notice, the name of Tavmjong Bah shall not -be used in advertising or otherwise to promote the sale, use or other -dealings in this Font Software without prior written authorization -from Tavmjong Bah. For further information, contact: tavmjong @ free -. fr. - -TeX Gyre DJV Math ------------------ -Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. - -Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski -(on behalf of TeX users groups) are in public domain. - -Letters imported from Euler Fraktur from AMSfonts are (c) American -Mathematical Society (see below). -Bitstream Vera Fonts Copyright -Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera -is a trademark of Bitstream, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of the fonts accompanying this license (“Fonts”) and associated -documentation -files (the “Font Software”), to reproduce and distribute the Font Software, -including without limitation the rights to use, copy, merge, publish, -distribute, -and/or sell copies of the Font Software, and to permit persons to whom -the Font Software is furnished to do so, subject to the following -conditions: - -The above copyright and trademark notices and this permission notice -shall be -included in all copies of one or more of the Font Software typefaces. - -The Font Software may be modified, altered, or added to, and in particular -the designs of glyphs or characters in the Fonts may be modified and -additional -glyphs or characters may be added to the Fonts, only if the fonts are -renamed -to names not containing either the words “Bitstream” or the word “Vera”. - -This License becomes null and void to the extent applicable to Fonts or -Font Software -that has been modified and is distributed under the “Bitstream Vera” -names. - -The Font Software may be sold as part of a larger software package but -no copy -of one or more of the Font Software typefaces may be sold by itself. - -THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME -FOUNDATION -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, -SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN -ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR -INABILITY TO USE -THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -Except as contained in this notice, the names of GNOME, the GNOME -Foundation, -and Bitstream Inc., shall not be used in advertising or otherwise to promote -the sale, use or other dealings in this Font Software without prior written -authorization from the GNOME Foundation or Bitstream Inc., respectively. -For further information, contact: fonts at gnome dot org. - -AMSFonts (v. 2.2) copyright - -The PostScript Type 1 implementation of the AMSFonts produced by and -previously distributed by Blue Sky Research and Y&Y, Inc. are now freely -available for general use. This has been accomplished through the -cooperation -of a consortium of scientific publishers with Blue Sky Research and Y&Y. -Members of this consortium include: - -Elsevier Science IBM Corporation Society for Industrial and Applied -Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS) - -In order to assure the authenticity of these fonts, copyright will be -held by -the American Mathematical Society. This is not meant to restrict in any way -the legitimate use of the fonts, such as (but not limited to) electronic -distribution of documents containing these fonts, inclusion of these fonts -into other public domain or commercial font collections or computer -applications, use of the outline data to create derivative fonts and/or -faces, etc. However, the AMS does require that the AMS copyright notice be -removed from any derivative versions of the fonts which have been altered in -any way. In addition, to ensure the fidelity of TeX documents using Computer -Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces, -has requested that any alterations which yield different font metrics be -given a different name. - -$Id$ diff --git a/res/fonts/DejaVuSansMono-Oblique.ttf b/res/fonts/DejaVuSansMono-Oblique.ttf deleted file mode 100644 index 4c858d4..0000000 Binary files a/res/fonts/DejaVuSansMono-Oblique.ttf and /dev/null differ diff --git a/res/fonts/DejaVuSansMono.ttf b/res/fonts/DejaVuSansMono.ttf deleted file mode 100644 index f578602..0000000 Binary files a/res/fonts/DejaVuSansMono.ttf and /dev/null differ diff --git a/rustc.sh b/rustc.sh deleted file mode 100755 index ecd5588..0000000 --- a/rustc.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -have_o=false -for arg in "$@"; do - if [[ "$arg" = "-o" ]]; then - have_o=true - break - fi -done - -args=() -for arg in "$@"; do - if [[ $have_o = true && "$arg" =~ ^extra-filename= ]]; then - unset args[${#args[@]}-1] - elif [[ $have_o = true && "$arg" =~ ^--emit= ]]; then - args+=("--emit=link") - else - args+=("$arg") - fi -done - -RUST_BACKTRACE=1 exec rustc -L build/userspace "${args[@]}" diff --git a/rustdoc.sh b/rustdoc.sh deleted file mode 100755 index f60c41b..0000000 --- a/rustdoc.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -RUST_BACKTRACE=1 rustdoc -L build/userspace $* diff --git a/rustfmt.toml b/rustfmt.toml deleted file mode 100644 index 6776cef..0000000 --- a/rustfmt.toml +++ /dev/null @@ -1,5 +0,0 @@ -max_width = 200 -ideal_width = 100 -fn_call_width = 80 -wrap_match_arms = false -write_mode = "Overwrite" diff --git a/schemes/ethernetd/Cargo.toml b/schemes/ethernetd/Cargo.toml deleted file mode 100644 index 835b07e..0000000 --- a/schemes/ethernetd/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "ethernetd" -version = "0.1.0" - -[dependencies] -netutils = { git = "https://github.com/redox-os/netutils.git" } -redox_event = { git = "https://github.com/redox-os/event.git" } -redox_syscall = "0.1" diff --git a/schemes/ethernetd/src/main.rs b/schemes/ethernetd/src/main.rs deleted file mode 100644 index 7185435..0000000 --- a/schemes/ethernetd/src/main.rs +++ /dev/null @@ -1,110 +0,0 @@ -extern crate event; -extern crate netutils; -extern crate syscall; - -use event::EventQueue; -use std::cell::RefCell; -use std::fs::File; -use std::io::{Result, Read, Write}; -use std::os::unix::io::FromRawFd; -use std::process; -use std::rc::Rc; - -use syscall::{Packet, SchemeMut, EWOULDBLOCK}; - -use scheme::EthernetScheme; - -mod scheme; - -fn daemon(network_fd: usize, socket_fd: usize) { - let network = unsafe { File::from_raw_fd(network_fd) }; - let socket = Rc::new(RefCell::new(unsafe { File::from_raw_fd(socket_fd) })); - let scheme = Rc::new(RefCell::new(EthernetScheme::new(network))); - let todo = Rc::new(RefCell::new(Vec::::new())); - - let mut event_queue = EventQueue::<()>::new().expect("ethernetd: failed to create event queue"); - - let socket_net = socket.clone(); - let scheme_net = scheme.clone(); - let todo_net = todo.clone(); - event_queue.add(network_fd, move |_count: usize| -> Result> { - if scheme_net.borrow_mut().input()? > 0 { - let mut todo = todo_net.borrow_mut(); - let mut i = 0; - while i < todo.len() { - let a = todo[i].a; - scheme_net.borrow_mut().handle(&mut todo[i]); - if todo[i].a == (-EWOULDBLOCK) as usize { - todo[i].a = a; - i += 1; - } else { - socket_net.borrow_mut().write(&mut todo[i])?; - todo.remove(i); - } - } - - for (id, handle) in scheme_net.borrow_mut().handles.iter() { - if let Some(frame) = handle.frames.get(0) { - socket_net.borrow_mut().write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: syscall::flag::EVENT_READ, - d: frame.data.len() - })?; - } - } - } - Ok(None) - }).expect("ethernetd: failed to listen for network events"); - - event_queue.add(socket_fd, move |_count: usize| -> Result> { - loop { - let mut packet = Packet::default(); - if socket.borrow_mut().read(&mut packet)? == 0 { - break; - } - - let a = packet.a; - scheme.borrow_mut().handle(&mut packet); - if packet.a == (-EWOULDBLOCK) as usize { - packet.a = a; - todo.borrow_mut().push(packet); - } else { - socket.borrow_mut().write(&mut packet)?; - } - } - - Ok(None) - }).expect("ethernetd: failed to listen for scheme events"); - - event_queue.trigger_all(0).expect("ethernetd: failed to trigger events"); - - event_queue.run().expect("ethernetd: failed to run event loop"); -} - -fn main() { - match syscall::open("network:", syscall::O_RDWR | syscall::O_NONBLOCK) { - Ok(network_fd) => { - // Daemonize - if unsafe { syscall::clone(0).unwrap() } == 0 { - match syscall::open(":ethernet", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK) { - Ok(socket_fd) => { - daemon(network_fd, socket_fd); - }, - Err(err) => { - println!("ethernetd: failed to create ethernet scheme: {}", err); - process::exit(1); - } - } - } - }, - Err(err) => { - println!("ethernetd: failed to open network: {}", err); - process::exit(1); - } - } -} diff --git a/schemes/ethernetd/src/scheme.rs b/schemes/ethernetd/src/scheme.rs deleted file mode 100644 index 7b1b3bd..0000000 --- a/schemes/ethernetd/src/scheme.rs +++ /dev/null @@ -1,164 +0,0 @@ -use std::collections::{BTreeMap, VecDeque}; -use std::fs::File; -use std::io::{self, Read, Write}; -use std::os::unix::io::AsRawFd; -use std::{cmp, str, u16}; - -use netutils::{getcfg, MacAddr, EthernetII}; -use syscall; -use syscall::error::{Error, Result, EACCES, EBADF, EINVAL, EIO, EWOULDBLOCK}; -use syscall::flag::O_NONBLOCK; -use syscall::scheme::SchemeMut; - -#[derive(Clone)] -pub struct Handle { - /// The flags this handle was opened with - flags: usize, - /// The Host's MAC address - pub host_addr: MacAddr, - /// The ethernet type - pub ethertype: u16, - /// The data - pub frames: VecDeque, -} - -pub struct EthernetScheme { - network: File, - next_id: usize, - pub handles: BTreeMap -} - -impl EthernetScheme { - pub fn new(network: File) -> EthernetScheme { - EthernetScheme { - network: network, - next_id: 1, - handles: BTreeMap::new(), - } - } - - //TODO: Minimize allocation - //TODO: Reduce iteration cost (use BTreeMap of ethertype to handle?) - pub fn input(&mut self) -> io::Result { - let mut total = 0; - loop { - let mut bytes = [0; 65536]; - let count = self.network.read(&mut bytes)?; - if count == 0 { - break; - } - if let Some(frame) = EthernetII::from_bytes(&bytes[.. count]) { - for (_id, handle) in self.handles.iter_mut() { - if frame.header.ethertype.get() == handle.ethertype { - handle.frames.push_back(frame.clone()); - } - } - total += count; - } - } - Ok(total) - } -} - -impl SchemeMut for EthernetScheme { - fn open(&mut self, url: &[u8], flags: usize, uid: u32, _gid: u32) -> Result { - if uid == 0 { - let mac_addr = MacAddr::from_str(&getcfg("mac").map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?); - let path = try!(str::from_utf8(url).or(Err(Error::new(EINVAL)))); - - let ethertype = u16::from_str_radix(path, 16).unwrap_or(0); - - let next_id = self.next_id; - self.next_id += 1; - - self.handles.insert(next_id, Handle { - flags: flags, - host_addr: mac_addr, - ethertype: ethertype, - frames: VecDeque::new() - }); - - Ok(next_id) - } else { - Err(Error::new(EACCES)) - } - } - - fn dup(&mut self, id: usize, _buf: &[u8]) -> Result { - let next_id = self.next_id; - self.next_id += 1; - - let handle = { - let handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; - handle.clone() - }; - - self.handles.insert(next_id, handle); - - Ok(next_id) - } - - fn read(&mut self, id: usize, buf: &mut [u8]) -> Result { - let handle = self.handles.get_mut(&id).ok_or(Error::new(EBADF))?; - - if let Some(frame) = handle.frames.pop_front() { - let data = frame.to_bytes(); - for (b, d) in buf.iter_mut().zip(data.iter()) { - *b = *d; - } - - Ok(cmp::min(buf.len(), data.len())) - } else if handle.flags & O_NONBLOCK == O_NONBLOCK { - Ok(0) - } else { - Err(Error::new(EWOULDBLOCK)) - } - } - - fn write(&mut self, id: usize, buf: &[u8]) -> Result { - let handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; - - if let Some(mut frame) = EthernetII::from_bytes(buf) { - frame.header.src = handle.host_addr; - frame.header.ethertype.set(handle.ethertype); - self.network.write(&frame.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO))) - } else { - Err(Error::new(EINVAL)) - } - } - - fn fevent(&mut self, id: usize, _flags: usize) -> Result { - let _handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; - - Ok(id) - } - - fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result { - let handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; - - let path_string = format!("ethernet:{:X}", handle.ethertype); - let path = path_string.as_bytes(); - - let mut i = 0; - while i < buf.len() && i < path.len() { - buf[i] = path[i]; - i += 1; - } - - Ok(i) - } - - fn fsync(&mut self, id: usize) -> Result { - let _handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; - - syscall::fsync(self.network.as_raw_fd()) - } - - fn close(&mut self, id: usize) -> Result { - let handle = self.handles.remove(&id).ok_or(Error::new(EBADF))?; - - drop(handle); - - Ok(0) - } -} diff --git a/schemes/ipd/Cargo.toml b/schemes/ipd/Cargo.toml deleted file mode 100644 index 3192911..0000000 --- a/schemes/ipd/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -name = "ipd" -version = "0.1.0" - -[dependencies] -netutils = { git = "https://github.com/redox-os/netutils.git" } -redox_event = { git = "https://github.com/redox-os/event.git" } -redox_syscall = "0.1" diff --git a/schemes/ipd/src/interface/ethernet.rs b/schemes/ipd/src/interface/ethernet.rs deleted file mode 100644 index d914a78..0000000 --- a/schemes/ipd/src/interface/ethernet.rs +++ /dev/null @@ -1,155 +0,0 @@ -use netutils::{getcfg, n16, Ipv4Addr, MacAddr, Ipv4, EthernetII, EthernetIIHeader, Arp}; -use std::collections::BTreeMap; -use std::fs::File; -use std::io::{Result, Read, Write}; -use std::os::unix::io::FromRawFd; - -use interface::Interface; - -pub struct EthernetInterface { - mac: MacAddr, - ip: Ipv4Addr, - router: Ipv4Addr, - subnet: Ipv4Addr, - arp_file: File, - ip_file: File, - arp: BTreeMap, - rarp: BTreeMap, -} - -impl EthernetInterface { - pub fn new(arp_fd: usize, ip_fd: usize) -> Self { - EthernetInterface { - mac: MacAddr::from_str(&getcfg("mac").unwrap()), - ip: Ipv4Addr::from_str(&getcfg("ip").unwrap()), - router: Ipv4Addr::from_str(&getcfg("ip_router").unwrap()), - subnet: Ipv4Addr::from_str(&getcfg("ip_subnet").unwrap()), - arp_file: unsafe { File::from_raw_fd(arp_fd) }, - ip_file: unsafe { File::from_raw_fd(ip_fd) }, - arp: BTreeMap::new(), - rarp: BTreeMap::new(), - } - } -} - -impl Interface for EthernetInterface { - fn ip(&self) -> Ipv4Addr { - self.ip - } - - fn routable(&self, dst: Ipv4Addr) -> bool { - dst != Ipv4Addr::LOOPBACK - } - - fn arp_event(&mut self) -> Result<()> { - loop { - let mut bytes = [0; 65536]; - let count = self.arp_file.read(&mut bytes)?; - if count == 0 { - break; - } - if let Some(frame) = EthernetII::from_bytes(&bytes[.. count]) { - if let Some(packet) = Arp::from_bytes(&frame.data) { - if packet.header.oper.get() == 1 { - if packet.header.dst_ip == self.ip { - if packet.header.src_ip != Ipv4Addr::BROADCAST && frame.header.src != MacAddr::BROADCAST { - self.arp.insert(packet.header.src_ip, frame.header.src); - self.rarp.insert(frame.header.src, packet.header.src_ip); - } - - let mut response = Arp { - header: packet.header, - data: packet.data.clone(), - }; - response.header.oper.set(2); - response.header.dst_mac = packet.header.src_mac; - response.header.dst_ip = packet.header.src_ip; - response.header.src_mac = self.mac; - response.header.src_ip = self.ip; - - let mut response_frame = EthernetII { - header: frame.header, - data: response.to_bytes() - }; - - response_frame.header.dst = response_frame.header.src; - response_frame.header.src = self.mac; - - self.arp_file.write(&response_frame.to_bytes())?; - } - } - } - } - } - - Ok(()) - } - - fn recv(&mut self) -> Result> { - let mut ips = Vec::new(); - - loop { - let mut bytes = [0; 65536]; - let count = self.ip_file.read(&mut bytes)?; - if count == 0 { - break; - } - if let Some(frame) = EthernetII::from_bytes(&bytes[.. count]) { - if let Some(ip) = Ipv4::from_bytes(&frame.data) { - if ip.header.dst == self.ip || ip.header.dst == Ipv4Addr::BROADCAST { - //TODO: Handle ping here - - if ip.header.src != Ipv4Addr::BROADCAST && frame.header.src != MacAddr::BROADCAST { - self.arp.insert(ip.header.src, frame.header.src); - self.rarp.insert(frame.header.src, ip.header.src); - } - - ips.push(ip); - } - } - } - } - - Ok(ips) - } - - fn send(&mut self, ip: Ipv4) -> Result { - let mut dst = MacAddr::BROADCAST; - if ip.header.dst != Ipv4Addr::BROADCAST { - let mut needs_routing = false; - - for octet in 0..4 { - let me = self.ip.bytes[octet]; - let mask = self.subnet.bytes[octet]; - let them = ip.header.dst.bytes[octet]; - if me & mask != them & mask { - needs_routing = true; - break; - } - } - - let route_addr = if needs_routing { - self.router - } else { - ip.header.dst - }; - - if let Some(mac) = self.arp.get(&route_addr) { - dst = *mac; - } else { - println!("ipd: need to arp {}", route_addr.to_string()); - } - } - - let frame = EthernetII { - header: EthernetIIHeader { - dst: dst, - src: self.mac, - ethertype: n16::new(0x800), - }, - data: ip.to_bytes() - }; - - self.ip_file.write(&frame.to_bytes()) - } -} diff --git a/schemes/ipd/src/interface/loopback.rs b/schemes/ipd/src/interface/loopback.rs deleted file mode 100644 index a957ef8..0000000 --- a/schemes/ipd/src/interface/loopback.rs +++ /dev/null @@ -1,50 +0,0 @@ -use netutils::{Ipv4Addr, Ipv4}; -use std::io::Result; - -use interface::Interface; - -pub struct LoopbackInterface { - packets: Vec -} - -impl LoopbackInterface { - pub fn new() -> Self { - LoopbackInterface { - packets: Vec::new() - } - } -} - -impl Interface for LoopbackInterface { - fn ip(&self) -> Ipv4Addr { - Ipv4Addr::LOOPBACK - } - - fn routable(&self, dst: Ipv4Addr) -> bool { - dst == Ipv4Addr::LOOPBACK - } - - fn recv(&mut self) -> Result> { - let mut ips = Vec::new(); - - for ip in self.packets.drain(..) { - ips.push(ip); - } - - Ok(ips) - } - - fn send(&mut self, ip: Ipv4) -> Result { - self.packets.push(ip); - - Ok(0) - } - - fn arp_event(&mut self) -> Result<()> { - Ok(()) - } - - fn has_loopback_data(&self) -> bool { - ! self.packets.is_empty() - } -} diff --git a/schemes/ipd/src/interface/mod.rs b/schemes/ipd/src/interface/mod.rs deleted file mode 100644 index 2fa89d9..0000000 --- a/schemes/ipd/src/interface/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -use netutils::{Ipv4, Ipv4Addr}; -use std::io::Result; - -pub use self::ethernet::EthernetInterface; -pub use self::loopback::LoopbackInterface; - -mod ethernet; -mod loopback; - -pub trait Interface { - fn ip(&self) -> Ipv4Addr; - fn routable(&self, dst: Ipv4Addr) -> bool; - fn recv(&mut self) -> Result>; - fn send(&mut self, ip: Ipv4) -> Result; - - fn arp_event(&mut self) -> Result<()>; - - fn has_loopback_data(&self) -> bool { false } -} diff --git a/schemes/ipd/src/main.rs b/schemes/ipd/src/main.rs deleted file mode 100644 index 49e332f..0000000 --- a/schemes/ipd/src/main.rs +++ /dev/null @@ -1,341 +0,0 @@ -extern crate event; -extern crate netutils; -extern crate syscall; - -use event::EventQueue; -use netutils::{Ipv4Addr, Ipv4, Tcp}; -use std::cell::RefCell; -use std::collections::{BTreeMap, VecDeque}; -use std::fs::File; -use std::io::{self, Read, Write}; -use std::os::unix::io::FromRawFd; -use std::{process, slice, str}; -use std::rc::Rc; -use syscall::data::Packet; -use syscall::error::{Error, Result, EACCES, EADDRNOTAVAIL, EBADF, EIO, EINVAL, ENOENT, EWOULDBLOCK}; -use syscall::flag::{EVENT_READ, O_NONBLOCK}; -use syscall::scheme::SchemeMut; - -use interface::{Interface, EthernetInterface, LoopbackInterface}; - -mod interface; - -struct Handle { - proto: u8, - flags: usize, - events: usize, - data: VecDeque>, - todo: VecDeque, -} - -struct Ipd { - scheme_file: File, - interfaces: Vec>, - next_id: usize, - handles: BTreeMap, -} - -impl Ipd { - fn new(scheme_file: File) -> Self { - Ipd { - scheme_file: scheme_file, - interfaces: Vec::new(), - next_id: 1, - handles: BTreeMap::new(), - } - } - - fn scheme_event(&mut self) -> io::Result<()> { - loop { - let mut packet = Packet::default(); - if self.scheme_file.read(&mut packet)? == 0 { - break; - } - - let a = packet.a; - self.handle(&mut packet); - if packet.a == (-EWOULDBLOCK) as usize { - packet.a = a; - if let Some(mut handle) = self.handles.get_mut(&packet.b) { - handle.todo.push_back(packet); - } - } else { - self.scheme_file.write(&packet)?; - } - } - - Ok(()) - } - - fn ip_event(&mut self, if_id: usize) -> io::Result<()> { - if let Some(mut interface) = self.interfaces.get_mut(if_id) { - for ip in interface.recv()? { - for (id, handle) in self.handles.iter_mut() { - if ip.header.proto == handle.proto { - handle.data.push_back(ip.to_bytes()); - - while ! handle.todo.is_empty() && ! handle.data.is_empty() { - let mut packet = handle.todo.pop_front().unwrap(); - let buf = unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }; - let data = handle.data.pop_front().unwrap(); - - let mut i = 0; - while i < buf.len() && i < data.len() { - buf[i] = data[i]; - i += 1; - } - packet.a = i; - - self.scheme_file.write(&packet)?; - } - - if handle.events & EVENT_READ == EVENT_READ { - if let Some(data) = handle.data.get(0) { - self.scheme_file.write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: EVENT_READ, - d: data.len() - })?; - } - } - } - } - } - } - - Ok(()) - } - - fn loopback_event(&mut self, loopback_id: usize) -> io::Result<()> { - let handle_loopback = if let Some(interface) = self.interfaces.get(loopback_id) { - interface.has_loopback_data() - } else { - false - }; - - if handle_loopback { - self.ip_event(loopback_id)?; - } - - Ok(()) - } -} - -impl SchemeMut for Ipd { - fn open(&mut self, url: &[u8], flags: usize, uid: u32, _gid: u32) -> Result { - if uid == 0 { - let path = str::from_utf8(url).or(Err(Error::new(EINVAL)))?; - - let proto = u8::from_str_radix(path, 16).or(Err(Error::new(ENOENT)))?; - - let id = self.next_id; - self.next_id += 1; - - self.handles.insert(id, Handle { - proto: proto, - flags: flags, - events: 0, - data: VecDeque::new(), - todo: VecDeque::new(), - }); - - Ok(id) - } else { - Err(Error::new(EACCES)) - } - } - - fn dup(&mut self, file: usize, _buf: &[u8]) -> Result { - let handle = { - let handle = self.handles.get(&file).ok_or(Error::new(EBADF))?; - Handle { - proto: handle.proto, - flags: handle.flags, - events: 0, - data: handle.data.clone(), - todo: VecDeque::new(), - } - }; - - let id = self.next_id; - self.next_id += 1; - - self.handles.insert(id, handle); - - Ok(id) - } - - fn read(&mut self, file: usize, buf: &mut [u8]) -> Result { - let mut handle = self.handles.get_mut(&file).ok_or(Error::new(EBADF))?; - - if let Some(data) = handle.data.pop_front() { - let mut i = 0; - while i < buf.len() && i < data.len() { - buf[i] = data[i]; - i += 1; - } - - Ok(i) - } else if handle.flags & O_NONBLOCK == O_NONBLOCK { - Ok(0) - } else { - Err(Error::new(EWOULDBLOCK)) - } - } - - fn write(&mut self, file: usize, buf: &[u8]) -> Result { - let handle = self.handles.get(&file).ok_or(Error::new(EBADF))?; - - if let Some(mut ip) = Ipv4::from_bytes(buf) { - for mut interface in self.interfaces.iter_mut() { - let if_ip = interface.ip(); - if ip.header.src == if_ip || (ip.header.src == Ipv4Addr::NULL && interface.routable(ip.header.dst)) { - ip.header.src = if_ip; - ip.header.proto = handle.proto; - - if let Some(mut tcp) = Tcp::from_bytes(&ip.data) { - tcp.checksum(&ip.header.src, &ip.header.dst); - ip.data = tcp.to_bytes(); - } - - ip.checksum(); - - interface.send(ip).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?; - - return Ok(buf.len()); - } - } - - Err(Error::new(EADDRNOTAVAIL)) - } else { - Err(Error::new(EINVAL)) - } - } - - fn fevent(&mut self, file: usize, flags: usize) -> Result { - let mut handle = self.handles.get_mut(&file).ok_or(Error::new(EBADF))?; - - handle.events = flags; - - Ok(file) - } - - fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result { - let handle = self.handles.get(&id).ok_or(Error::new(EBADF))?; - - let path_string = format!("ip:{:X}", handle.proto); - let path = path_string.as_bytes(); - - let mut i = 0; - while i < buf.len() && i < path.len() { - buf[i] = path[i]; - i += 1; - } - - Ok(i) - } - - fn fsync(&mut self, file: usize) -> Result { - let _handle = self.handles.get(&file).ok_or(Error::new(EBADF))?; - - Ok(0) - } - - fn close(&mut self, file: usize) -> Result { - let handle = self.handles.remove(&file).ok_or(Error::new(EBADF))?; - - drop(handle); - - Ok(0) - } -} - -fn daemon(arp_fd: usize, ip_fd: usize, scheme_fd: usize) { - let scheme_file = unsafe { File::from_raw_fd(scheme_fd) }; - - let ipd = Rc::new(RefCell::new(Ipd::new(scheme_file))); - - let mut event_queue = EventQueue::<()>::new().expect("ipd: failed to create event queue"); - - //TODO: Multiple interfaces - { - let if_id = { - let mut ipd = ipd.borrow_mut(); - let if_id = ipd.interfaces.len(); - ipd.interfaces.push(Box::new(EthernetInterface::new(arp_fd, ip_fd))); - if_id - }; - - let arp_ipd = ipd.clone(); - event_queue.add(arp_fd, move |_count: usize| -> io::Result> { - if let Some(mut interface) = arp_ipd.borrow_mut().interfaces.get_mut(if_id) { - interface.arp_event()?; - } - - Ok(None) - }).expect("ipd: failed to listen to events on ethernet:806"); - - let ip_ipd = ipd.clone(); - event_queue.add(ip_fd, move |_count: usize| -> io::Result> { - ip_ipd.borrow_mut().ip_event(if_id)?; - - Ok(None) - }).expect("ipd: failed to listen to events on ethernet:800"); - } - - let loopback_id = { - let mut ipd = ipd.borrow_mut(); - let if_id = ipd.interfaces.len(); - ipd.interfaces.push(Box::new(LoopbackInterface::new())); - if_id - }; - - event_queue.add(scheme_fd, move |_count: usize| -> io::Result> { - let mut ipd = ipd.borrow_mut(); - - ipd.loopback_event(loopback_id)?; - ipd.scheme_event()?; - ipd.loopback_event(loopback_id)?; - - Ok(None) - }).expect("ipd: failed to listen to events on :ip"); - - // Make sure that all descriptors are at EOF - event_queue.trigger_all(0).expect("ipd: failed to trigger event queue"); - - event_queue.run().expect("ipd: failed to run event queue"); -} - -fn main() { - match syscall::open("ethernet:806", syscall::O_RDWR | syscall::O_NONBLOCK) { - Ok(arp_fd) => match syscall::open("ethernet:800", syscall::O_RDWR | syscall::O_NONBLOCK) { - Ok(ip_fd) => { - // Daemonize - if unsafe { syscall::clone(0).unwrap() } == 0 { - match syscall::open(":ip", syscall::O_RDWR | syscall::O_CREAT | syscall::O_NONBLOCK) { - Ok(scheme_fd) => { - daemon(arp_fd, ip_fd, scheme_fd); - }, - Err(err) => { - println!("ipd: failed to create ip scheme: {}", err); - process::exit(1); - } - } - } - }, - Err(err) => { - println!("ipd: failed to open ethernet:800: {}", err); - process::exit(1); - } - }, - Err(err) => { - println!("ipd: failed to open ethernet:806: {}", err); - process::exit(1); - } - } -} diff --git a/schemes/orbital b/schemes/orbital deleted file mode 160000 index e8a7304..0000000 --- a/schemes/orbital +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e8a73040268708a5f8bde3e9d703f6cbbab2b85f diff --git a/schemes/ptyd/Cargo.toml b/schemes/ptyd/Cargo.toml deleted file mode 100644 index 093da85..0000000 --- a/schemes/ptyd/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "ptyd" -version = "0.1.0" - -[dependencies] -redox_syscall = "0.1" diff --git a/schemes/ptyd/src/main.rs b/schemes/ptyd/src/main.rs deleted file mode 100644 index 2a982fa..0000000 --- a/schemes/ptyd/src/main.rs +++ /dev/null @@ -1,414 +0,0 @@ -#![deny(warnings)] - -extern crate syscall; - -use std::cell::RefCell; -use std::collections::{BTreeMap, VecDeque}; -use std::fs::File; -use std::io::{Read, Write}; -use std::rc::{Rc, Weak}; -use std::str; - -use syscall::data::Packet; -use syscall::error::{Error, Result, EBADF, EINVAL, ENOENT, EPIPE, EWOULDBLOCK}; -use syscall::flag::{F_GETFL, F_SETFL, O_ACCMODE, O_NONBLOCK}; -use syscall::scheme::SchemeMut; - -pub struct PtyScheme { - next_id: usize, - ptys: (BTreeMap, BTreeMap) -} - -impl PtyScheme { - fn new() -> Self { - PtyScheme { - next_id: 0, - ptys: (BTreeMap::new(), BTreeMap::new()) - } - } -} - -impl SchemeMut for PtyScheme { - fn open(&mut self, path: &[u8], flags: usize, _uid: u32, _gid: u32) -> Result { - let path = str::from_utf8(path).or(Err(Error::new(EINVAL)))?.trim_matches('/'); - - if path.is_empty() { - let id = self.next_id; - self.next_id += 1; - - self.ptys.0.insert(id, PtyMaster::new(id, flags)); - - Ok(id) - } else { - let master_id = path.parse::().or(Err(Error::new(EINVAL)))?; - let master = self.ptys.0.get(&master_id).map(|pipe| pipe.clone()).ok_or(Error::new(ENOENT))?; - - let id = self.next_id; - self.next_id += 1; - - self.ptys.1.insert(id, PtySlave::new(&master, flags)); - - Ok(id) - } - } - - fn dup(&mut self, id: usize, _buf: &[u8]) -> Result { - /* TODO CLOEXEC - Master cannot be cloned - let master_opt = self.ptys.0.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = master_opt { - let pipe_id = self.next_id; - self.next_id += 1; - self.ptys.0.insert(pipe_id, pipe); - return Ok(pipe_id); - } - */ - - let slave_opt = self.ptys.1.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = slave_opt { - let pipe_id = self.next_id; - self.next_id += 1; - self.ptys.1.insert(pipe_id, pipe); - return Ok(pipe_id); - } - - Err(Error::new(EBADF)) - } - - fn read(&mut self, id: usize, buf: &mut [u8]) -> Result { - let master_opt = self.ptys.0.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = master_opt { - return pipe.read(buf); - } - - let slave_opt = self.ptys.1.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = slave_opt { - return pipe.read(buf); - } - - Err(Error::new(EBADF)) - } - - fn write(&mut self, id: usize, buf: &[u8]) -> Result { - let master_opt = self.ptys.0.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = master_opt { - return pipe.write(buf); - } - - let slave_opt = self.ptys.1.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = slave_opt { - return pipe.write(buf); - } - - Err(Error::new(EBADF)) - } - - fn fcntl(&mut self, id: usize, cmd: usize, arg: usize) -> Result { - if let Some(pipe) = self.ptys.0.get_mut(&id) { - return pipe.fcntl(cmd, arg); - } - - if let Some(pipe) = self.ptys.1.get_mut(&id) { - return pipe.fcntl(cmd, arg); - } - - Err(Error::new(EBADF)) - } - - fn fevent(&mut self, id: usize, _flags: usize) -> Result { - if self.ptys.0.contains_key(&id) || self.ptys.1.contains_key(&id) { - Ok(id) - } else { - Err(Error::new(EBADF)) - } - } - - fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result { - let master_opt = self.ptys.0.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = master_opt { - return pipe.path(buf); - } - - let slave_opt = self.ptys.1.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = slave_opt { - return pipe.path(buf); - } - - Err(Error::new(EBADF)) - } - - fn fsync(&mut self, id: usize) -> Result { - let slave_opt = self.ptys.1.get(&id).map(|pipe| pipe.clone()); - if let Some(pipe) = slave_opt { - return pipe.sync(); - } - - Ok(0) - } - - fn close(&mut self, id: usize) -> Result { - drop(self.ptys.0.remove(&id)); - drop(self.ptys.1.remove(&id)); - - Ok(0) - } -} - -/// Read side of a pipe -#[derive(Clone)] -pub struct PtyMaster { - id: usize, - flags: usize, - read: Rc>>>, - write: Rc>>, -} - -impl PtyMaster { - pub fn new(id: usize, flags: usize) -> Self { - PtyMaster { - id: id, - flags: flags, - read: Rc::new(RefCell::new(VecDeque::new())), - write: Rc::new(RefCell::new(VecDeque::new())), - } - } - - fn path(&self, buf: &mut [u8]) -> Result { - let path_str = format!("pty:{}", self.id); - let path = path_str.as_bytes(); - - let mut i = 0; - while i < buf.len() && i < path.len() { - buf[i] = path[i]; - i += 1; - } - - Ok(i) - } - - fn read(&self, buf: &mut [u8]) -> Result { - let mut read = self.read.borrow_mut(); - - if let Some(packet) = read.pop_front() { - let mut i = 0; - - while i < buf.len() && i < packet.len() { - buf[i] = packet[i]; - i += 1; - } - - Ok(i) - } else if self.flags & O_NONBLOCK == O_NONBLOCK || Rc::weak_count(&self.read) == 0 { - Ok(0) - } else { - Err(Error::new(EWOULDBLOCK)) - } - } - - fn write(&self, buf: &[u8]) -> Result { - let mut write = self.write.borrow_mut(); - - let mut i = 0; - while i < buf.len() { - write.push_back(buf[i]); - i += 1; - } - - Ok(i) - } - - fn fcntl(&mut self, cmd: usize, arg: usize) -> Result { - match cmd { - F_GETFL => Ok(self.flags), - F_SETFL => { - self.flags = arg & ! O_ACCMODE; - Ok(0) - }, - _ => Err(Error::new(EINVAL)) - } - } -} - -/// Read side of a pipe -#[derive(Clone)] -pub struct PtySlave { - master_id: usize, - flags: usize, - read: Weak>>, - write: Weak>>>, -} - -impl PtySlave { - pub fn new(master: &PtyMaster, flags: usize) -> Self { - PtySlave { - master_id: master.id, - flags: flags, - read: Rc::downgrade(&master.write), - write: Rc::downgrade(&master.read), - } - } - - fn path(&self, buf: &mut [u8]) -> Result { - let path_str = format!("pty:{}", self.master_id); - let path = path_str.as_bytes(); - - let mut i = 0; - while i < buf.len() && i < path.len() { - buf[i] = path[i]; - i += 1; - } - - Ok(i) - } - - fn read(&self, buf: &mut [u8]) -> Result { - if let Some(read_lock) = self.read.upgrade() { - let mut read = read_lock.borrow_mut(); - - let mut i = 0; - - while i < buf.len() && ! read.is_empty() { - buf[i] = read.pop_front().unwrap(); - i += 1; - } - - if i > 0 || self.flags & O_NONBLOCK == O_NONBLOCK { - Ok(i) - } else { - Err(Error::new(EWOULDBLOCK)) - } - } else { - Ok(0) - } - } - - fn write(&self, buf: &[u8]) -> Result { - if let Some(write_lock) = self.write.upgrade() { - let mut vec = Vec::new(); - vec.push(0); - vec.extend_from_slice(buf); - - let mut write = write_lock.borrow_mut(); - write.push_back(vec); - - Ok(buf.len()) - } else { - Err(Error::new(EPIPE)) - } - } - - fn sync(&self) -> Result { - if let Some(write_lock) = self.write.upgrade() { - let mut vec = Vec::new(); - vec.push(1); - - let mut write = write_lock.borrow_mut(); - write.push_back(vec); - - Ok(0) - } else { - Err(Error::new(EPIPE)) - } - } - - fn fcntl(&mut self, cmd: usize, arg: usize) -> Result { - match cmd { - F_GETFL => Ok(self.flags), - F_SETFL => { - self.flags = arg & ! O_ACCMODE; - Ok(0) - }, - _ => Err(Error::new(EINVAL)) - } - } -} - -fn main(){ - // Daemonize - if unsafe { syscall::clone(0).unwrap() } == 0 { - let mut socket = File::create(":pty").expect("pty: failed to create pty scheme"); - let mut scheme = PtyScheme::new(); - let mut todo = Vec::new(); - loop { - let mut packet = Packet::default(); - socket.read(&mut packet).expect("pty: failed to read events from pty scheme"); - - let a = packet.a; - scheme.handle(&mut packet); - if packet.a == (-EWOULDBLOCK) as usize { - packet.a = a; - todo.push(packet); - } else { - socket.write(&packet).expect("pty: failed to write responses to pty scheme"); - } - - let mut i = 0; - while i < todo.len() { - let a = todo[i].a; - scheme.handle(&mut todo[i]); - if todo[i].a == (-EWOULDBLOCK) as usize { - todo[i].a = a; - i += 1; - } else { - let packet = todo.remove(i); - socket.write(&packet).expect("pty: failed to write responses to pty scheme"); - } - } - - for (id, master) in scheme.ptys.0.iter() { - let read = master.read.borrow(); - if let Some(data) = read.front() { - socket.write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: syscall::flag::EVENT_READ, - d: data.len() - }).expect("pty: failed to write event"); - } else if Rc::weak_count(&master.read) == 0 { - socket.write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: syscall::flag::EVENT_READ, - d: 0 - }).expect("pty: failed to write event"); - } - } - - for (id, slave) in scheme.ptys.1.iter() { - if let Some(read_lock) = slave.read.upgrade() { - let read = read_lock.borrow(); - if ! read.is_empty() { - socket.write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: syscall::flag::EVENT_READ, - d: read.len() - }).expect("pty: failed to write event"); - } - } else { - socket.write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: syscall::flag::EVENT_READ, - d: 0 - }).expect("pty: failed to write event"); - } - } - } - } -} diff --git a/schemes/randd/Cargo.toml b/schemes/randd/Cargo.toml deleted file mode 100644 index 3b7ebf2..0000000 --- a/schemes/randd/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "randd" -version = "0.1.0" - -[dependencies] -raw-cpuid = "2.0" -redox_syscall = "0.1" diff --git a/schemes/randd/src/main.rs b/schemes/randd/src/main.rs deleted file mode 100644 index c15936d..0000000 --- a/schemes/randd/src/main.rs +++ /dev/null @@ -1,92 +0,0 @@ -#![feature(asm)] -#![feature(rand)] - -extern crate syscall; -extern crate raw_cpuid; -extern crate rand; - -use std::fs::File; -use std::io::{Read, Write}; - -use rand::chacha::ChaChaRng; -use rand::Rng; - -use raw_cpuid::CpuId; - -use syscall::{Packet, Result, SchemeMut}; - -//TODO: Use a CSPRNG, allow write of entropy -struct RandScheme { - prng: ChaChaRng -} - -impl SchemeMut for RandScheme { - fn open(&mut self, _path: &[u8], _flags: usize, _uid: u32, _gid: u32) -> Result { - Ok(0) - } - - fn dup(&mut self, file: usize, _buf: &[u8]) -> Result { - Ok(file) - } - - fn read(&mut self, _file: usize, buf: &mut [u8]) -> Result { - let mut i = 0; - for chunk in buf.chunks_mut(8) { - let mut rand = self.prng.next_u64(); - for b in chunk.iter_mut() { - *b = rand as u8; - rand = rand >> 8; - i += 1; - } - } - Ok(i) - } - - fn fpath(&mut self, _file: usize, buf: &mut [u8]) -> Result { - let mut i = 0; - let scheme_path = b"rand"; - while i < buf.len() && i < scheme_path.len() { - buf[i] = scheme_path[i]; - i += 1; - } - Ok(i) - } - - fn close(&mut self, _file: usize) -> Result { - Ok(0) - } -} - -fn main(){ - let has_rdrand = CpuId::new().get_feature_info().unwrap().has_rdrand(); - - // Daemonize - if unsafe { syscall::clone(0).unwrap() } == 0 { - let mut socket = File::create(":rand").expect("rand: failed to create rand scheme"); - - let mut rng = ChaChaRng::new_unseeded(); - - if has_rdrand { - println!("rand: seeding with rdrand"); - let rand: u64; - unsafe { - asm!("rdrand rax" - : "={rax}"(rand) - : - : - : "intel", "volatile"); - } - rng.set_counter(0, rand); - } else { - println!("rand: unseeded"); - } - - let mut scheme = RandScheme{prng: rng}; - loop { - let mut packet = Packet::default(); - socket.read(&mut packet).expect("rand: failed to read events from rand scheme"); - scheme.handle(&mut packet); - socket.write(&packet).expect("rand: failed to write responses to rand scheme"); - } - } -} diff --git a/schemes/redoxfs b/schemes/redoxfs deleted file mode 160000 index 6c1d98c..0000000 --- a/schemes/redoxfs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6c1d98cea83e2bb02b940959e6b07625ec12656f diff --git a/schemes/tcpd/Cargo.toml b/schemes/tcpd/Cargo.toml deleted file mode 100644 index f756ee2..0000000 --- a/schemes/tcpd/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "tcpd" -version = "0.1.0" - -[dependencies] -netutils = { git = "https://github.com/redox-os/netutils.git" } -rand = "0.3" -redox_event = { git = "https://github.com/redox-os/event.git" } -redox_syscall = "0.1" diff --git a/schemes/tcpd/src/main.rs b/schemes/tcpd/src/main.rs deleted file mode 100644 index 8878b00..0000000 --- a/schemes/tcpd/src/main.rs +++ /dev/null @@ -1,937 +0,0 @@ -extern crate event; -extern crate netutils; -extern crate rand; -extern crate syscall; - -use rand::{Rng, OsRng}; -use std::collections::{BTreeMap, VecDeque}; -use std::cell::RefCell; -use std::fs::File; -use std::io::{self, Read, Write}; -use std::{mem, process, slice, str}; -use std::ops::{Deref, DerefMut}; -use std::os::unix::io::FromRawFd; -use std::rc::Rc; - -use event::EventQueue; -use netutils::{n16, n32, Ipv4, Ipv4Addr, Ipv4Header, Tcp, TcpHeader, Checksum, TCP_FIN, TCP_SYN, TCP_RST, TCP_PSH, TCP_ACK}; -use syscall::data::{Packet, TimeSpec}; -use syscall::error::{Error, Result, EACCES, EADDRINUSE, EBADF, EIO, EINVAL, EISCONN, EMSGSIZE, ENOTCONN, ETIMEDOUT, EWOULDBLOCK}; -use syscall::flag::{CLOCK_MONOTONIC, EVENT_READ, F_GETFL, F_SETFL, O_ACCMODE, O_CREAT, O_RDWR, O_NONBLOCK}; -use syscall::scheme::SchemeMut; - -fn add_time(a: &TimeSpec, b: &TimeSpec) -> TimeSpec { - let mut secs = a.tv_sec + b.tv_sec; - - let mut nsecs = a.tv_nsec + b.tv_nsec; - while nsecs >= 1000000000 { - nsecs -= 1000000000; - secs += 1; - } - - TimeSpec { - tv_sec: secs, - tv_nsec: nsecs - } -} - -fn parse_socket(socket: &str) -> (Ipv4Addr, u16) { - let mut socket_parts = socket.split(":"); - let host = Ipv4Addr::from_str(socket_parts.next().unwrap_or("")); - let port = socket_parts.next().unwrap_or("").parse::().unwrap_or(0); - (host, port) -} - -#[derive(Copy, Clone, Debug, Eq, PartialEq)] -enum State { - Listen, - SynSent, - SynReceived, - Established, - FinWait1, - FinWait2, - CloseWait, - Closing, - LastAck, - TimeWait, - Closed -} - -struct TcpHandle { - local: (Ipv4Addr, u16), - remote: (Ipv4Addr, u16), - flags: usize, - events: usize, - read_timeout: Option, - write_timeout: Option, - ttl: u8, - state: State, - seq: u32, - ack: u32, - data: VecDeque<(Ipv4, Tcp)>, - todo_dup: VecDeque, - todo_read: VecDeque<(Option, Packet)>, - todo_write: VecDeque<(Option, Packet)>, -} - -impl TcpHandle { - fn is_connected(&self) -> bool { - self.remote.0 != Ipv4Addr::NULL && self.remote.1 != 0 - } - - fn read_closed(&self) -> bool { - self.state == State::CloseWait || self.state == State::LastAck || self.state == State::TimeWait || self.state == State::Closed - } - - fn matches(&self, ip: &Ipv4, tcp: &Tcp) -> bool { - // Local address not set or IP dst matches or is broadcast - (self.local.0 == Ipv4Addr::NULL || ip.header.dst == self.local.0 || ip.header.dst == Ipv4Addr::BROADCAST) - // Local port matches UDP dst - && tcp.header.dst.get() == self.local.1 - // Remote address not set or is broadcast, or IP src matches - && (self.remote.0 == Ipv4Addr::NULL || self.remote.0 == Ipv4Addr::BROADCAST || ip.header.src == self.remote.0) - // Remote port not set or UDP src matches - && (self.remote.1 == 0 || tcp.header.src.get() == self.remote.1) - } - - fn create_tcp(&self, flags: u16, data: Vec) -> Tcp { - Tcp { - header: TcpHeader { - src: n16::new(self.local.1), - dst: n16::new(self.remote.1), - sequence: n32::new(self.seq), - ack_num: n32::new(self.ack), - flags: n16::new(((mem::size_of::() << 10) & 0xF000) as u16 | (flags & 0xFFF)), - window_size: n16::new(8192), - checksum: Checksum { data: 0 }, - urgent_pointer: n16::new(0), - }, - options: Vec::new(), - data: data - } - } - - fn create_ip(&self, id: u16, data: Vec) -> Ipv4 { - Ipv4 { - header: Ipv4Header { - ver_hlen: 0x45, - services: 0, - len: n16::new((data.len() + mem::size_of::()) as u16), - id: n16::new(id), - flags_fragment: n16::new(0), - ttl: self.ttl, - proto: 0x06, - checksum: Checksum { data: 0 }, - src: self.local.0, - dst: self.remote.0 - }, - options: Vec::new(), - data: data - } - } -} - -#[derive(Copy, Clone)] -enum SettingKind { - Ttl, - ReadTimeout, - WriteTimeout -} - -enum Handle { - Tcp(TcpHandle), - Setting(usize, SettingKind), -} - -struct Tcpd { - scheme_file: File, - tcp_file: File, - time_file: File, - ports: BTreeMap, - next_id: usize, - handles: BTreeMap, - rng: OsRng, -} - -impl Tcpd { - fn new(scheme_file: File, tcp_file: File, time_file: File) -> Self { - Tcpd { - scheme_file: scheme_file, - tcp_file: tcp_file, - time_file: time_file, - ports: BTreeMap::new(), - next_id: 1, - handles: BTreeMap::new(), - rng: OsRng::new().expect("tcpd: failed to open RNG") - } - } - - fn scheme_event(&mut self) -> io::Result<()> { - loop { - let mut packet = Packet::default(); - if self.scheme_file.read(&mut packet)? == 0 { - break; - } - - let a = packet.a; - self.handle(&mut packet); - if packet.a == (-EWOULDBLOCK) as usize { - if let Some(mut handle) = self.handles.get_mut(&packet.b) { - if let Handle::Tcp(ref mut handle) = *handle { - match a { - syscall::number::SYS_DUP => { - packet.a = a; - handle.todo_dup.push_back(packet); - }, - syscall::number::SYS_READ => { - packet.a = a; - - let timeout = match handle.read_timeout { - Some(read_timeout) => { - let mut time = TimeSpec::default(); - syscall::clock_gettime(CLOCK_MONOTONIC, &mut time).map_err(|err| io::Error::from_raw_os_error(err.errno))?; - - let timeout = add_time(&time, &read_timeout); - self.time_file.write(&timeout)?; - Some(timeout) - }, - None => None - }; - - handle.todo_read.push_back((timeout, packet)); - }, - syscall::number::SYS_WRITE => { - packet.a = a; - - let timeout = match handle.write_timeout { - Some(write_timeout) => { - let mut time = TimeSpec::default(); - syscall::clock_gettime(CLOCK_MONOTONIC, &mut time).map_err(|err| io::Error::from_raw_os_error(err.errno))?; - - let timeout = add_time(&time, &write_timeout); - self.time_file.write(&timeout)?; - Some(timeout) - }, - None => None - }; - - handle.todo_write.push_back((timeout, packet)); - }, - _ => { - self.scheme_file.write(&packet)?; - } - } - } - } - } else { - self.scheme_file.write(&packet)?; - } - } - - Ok(()) - } - - fn tcp_event(&mut self) -> io::Result<()> { - loop { - let mut bytes = [0; 65536]; - let count = self.tcp_file.read(&mut bytes)?; - if count == 0 { - break; - } - if let Some(ip) = Ipv4::from_bytes(&bytes[.. count]) { - if let Some(tcp) = Tcp::from_bytes(&ip.data) { - let mut closing = Vec::new(); - let mut found_connection = false; - for (id, handle) in self.handles.iter_mut() { - if let Handle::Tcp(ref mut handle) = *handle { - if handle.state != State::Listen && handle.matches(&ip, &tcp) { - found_connection = true; - - match handle.state { - State::SynReceived => if tcp.header.flags.get() & (TCP_SYN | TCP_ACK) == TCP_ACK && tcp.header.ack_num.get() == handle.seq { - handle.state = State::Established; - }, - State::SynSent => if tcp.header.flags.get() & (TCP_SYN | TCP_ACK) == TCP_SYN | TCP_ACK && tcp.header.ack_num.get() == handle.seq { - handle.state = State::Established; - handle.ack = tcp.header.sequence.get() + 1; - - let tcp = handle.create_tcp(TCP_ACK, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes())?; - }, - State::Established => if tcp.header.flags.get() & (TCP_SYN | TCP_ACK) == TCP_ACK && tcp.header.ack_num.get() == handle.seq { - handle.ack = tcp.header.sequence.get(); - - if ! tcp.data.is_empty() { - handle.data.push_back((ip.clone(), tcp.clone())); - handle.ack += tcp.data.len() as u32; - - let tcp = handle.create_tcp(TCP_ACK, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes())?; - } else if tcp.header.flags.get() & TCP_FIN == TCP_FIN { - handle.state = State::CloseWait; - - handle.ack += 1; - - let tcp = handle.create_tcp(TCP_ACK, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes())?; - } - }, - //TODO: Time wait - State::FinWait1 => if tcp.header.flags.get() & (TCP_SYN | TCP_ACK) == TCP_ACK && tcp.header.ack_num.get() == handle.seq { - handle.ack = tcp.header.sequence.get() + 1; - - if tcp.header.flags.get() & TCP_FIN == TCP_FIN { - handle.state = State::TimeWait; - - let tcp = handle.create_tcp(TCP_ACK, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes())?; - - closing.push(*id); - } else { - handle.state = State::FinWait2; - } - }, - State::FinWait2 => if tcp.header.flags.get() & (TCP_SYN | TCP_ACK | TCP_FIN) == TCP_ACK | TCP_FIN && tcp.header.ack_num.get() == handle.seq { - handle.ack = tcp.header.sequence.get() + 1; - - handle.state = State::TimeWait; - - let tcp = handle.create_tcp(TCP_ACK, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes())?; - - closing.push(*id); - }, - State::LastAck => if tcp.header.flags.get() & (TCP_SYN | TCP_ACK) == TCP_ACK && tcp.header.ack_num.get() == handle.seq { - handle.state = State::Closed; - closing.push(*id); - }, - _ => () - } - - while ! handle.todo_read.is_empty() && (! handle.data.is_empty() || handle.read_closed()) { - let (_timeout, mut packet) = handle.todo_read.pop_front().unwrap(); - let buf = unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }; - if let Some((_ip, tcp)) = handle.data.pop_front() { - let mut i = 0; - while i < buf.len() && i < tcp.data.len() { - buf[i] = tcp.data[i]; - i += 1; - } - packet.a = i; - } else { - packet.a = 0; - } - - self.scheme_file.write(&packet)?; - } - - if ! handle.todo_write.is_empty() && handle.state == State::Established { - let (_timeout, mut packet) = handle.todo_write.pop_front().unwrap(); - let buf = unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }; - - let tcp = handle.create_tcp(TCP_ACK | TCP_PSH, buf.to_vec()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - let result = self.tcp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO))); - if result.is_ok() { - handle.seq += buf.len() as u32; - } - packet.a = Error::mux(result.and(Ok(buf.len()))); - - self.scheme_file.write(&packet)?; - } - - if handle.events & EVENT_READ == EVENT_READ { - if let Some(&(ref _ip, ref tcp)) = handle.data.get(0) { - self.scheme_file.write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: EVENT_READ, - d: tcp.data.len() - })?; - } - } - } - } - } - - for file in closing { - if let Handle::Tcp(handle) = self.handles.remove(&file).unwrap() { - let remove = if let Some(mut port) = self.ports.get_mut(&handle.local.1) { - *port = *port + 1; - *port == 0 - } else { - false - }; - - if remove { - self.ports.remove(&handle.local.1); - } - } - } - - if ! found_connection && tcp.header.flags.get() & (TCP_SYN | TCP_ACK) == TCP_SYN { - let mut new_handles = Vec::new(); - - for (_id, handle) in self.handles.iter_mut() { - if let Handle::Tcp(ref mut handle) = *handle { - if handle.state == State::Listen && handle.matches(&ip, &tcp) { - handle.data.push_back((ip.clone(), tcp.clone())); - - while ! handle.todo_dup.is_empty() && ! handle.data.is_empty() { - let mut packet = handle.todo_dup.pop_front().unwrap(); - let (ip, tcp) = handle.data.pop_front().unwrap(); - - let mut new_handle = TcpHandle { - local: handle.local, - remote: (ip.header.src, tcp.header.src.get()), - flags: handle.flags, - events: 0, - read_timeout: handle.read_timeout, - write_timeout: handle.write_timeout, - ttl: handle.ttl, - state: State::SynReceived, - seq: self.rng.gen(), - ack: tcp.header.sequence.get() + 1, - data: VecDeque::new(), - todo_dup: VecDeque::new(), - todo_read: VecDeque::new(), - todo_write: VecDeque::new(), - }; - - let tcp = new_handle.create_tcp(TCP_SYN | TCP_ACK, Vec::new()); - let ip = new_handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes())?; - - new_handle.seq += 1; - - handle.data.retain(|&(ref ip, ref tcp)| { - if new_handle.matches(ip, tcp) { - false - } else { - true - } - }); - - if let Some(mut port) = self.ports.get_mut(&handle.local.1) { - *port = *port + 1; - } - - let id = self.next_id; - self.next_id += 1; - - packet.a = id; - - new_handles.push((packet, Handle::Tcp(new_handle))); - } - } - } - } - - for (packet, new_handle) in new_handles { - self.handles.insert(packet.a, new_handle); - self.scheme_file.write(&packet)?; - } - } - } - } - } - - Ok(()) - } - - fn time_event(&mut self) -> io::Result<()> { - let mut time = TimeSpec::default(); - if self.time_file.read(&mut time)? < mem::size_of::() { - return Err(io::Error::from_raw_os_error(EINVAL)); - } - - for (_id, handle) in self.handles.iter_mut() { - if let Handle::Tcp(ref mut handle) = *handle { - let mut i = 0; - while i < handle.todo_read.len() { - if let Some(timeout) = handle.todo_read.get(i).map(|e| e.0.clone()).unwrap_or(None) { - if time.tv_sec > timeout.tv_sec || (time.tv_sec == timeout.tv_sec && time.tv_nsec >= timeout.tv_nsec) { - let (_timeout, mut packet) = handle.todo_read.remove(i).unwrap(); - packet.a = (-ETIMEDOUT) as usize; - self.scheme_file.write(&packet)?; - } else { - i += 1; - } - } else { - i += 1; - } - } - - let mut i = 0; - while i < handle.todo_write.len() { - if let Some(timeout) = handle.todo_write.get(i).map(|e| e.0.clone()).unwrap_or(None) { - if time.tv_sec > timeout.tv_sec || (time.tv_sec == timeout.tv_sec && time.tv_nsec >= timeout.tv_nsec) { - let (_timeout, mut packet) = handle.todo_write.remove(i).unwrap(); - packet.a = (-ETIMEDOUT) as usize; - self.scheme_file.write(&packet)?; - } else { - i += 1; - } - } else { - i += 1; - } - } - } - } - - Ok(()) - } -} - -impl SchemeMut for Tcpd { - fn open(&mut self, url: &[u8], flags: usize, uid: u32, _gid: u32) -> Result { - let path = str::from_utf8(url).or(Err(Error::new(EINVAL)))?; - - let mut parts = path.split("/"); - let remote = parse_socket(parts.next().unwrap_or("")); - let mut local = parse_socket(parts.next().unwrap_or("")); - - if local.1 == 0 { - local.1 = self.rng.gen_range(32768, 65535); - } - - if local.1 <= 1024 && uid != 0 { - return Err(Error::new(EACCES)); - } - - if self.ports.contains_key(&local.1) { - return Err(Error::new(EADDRINUSE)); - } - - let mut handle = TcpHandle { - local: local, - remote: remote, - flags: flags, - events: 0, - read_timeout: None, - write_timeout: None, - ttl: 64, - state: State::Listen, - seq: 0, - ack: 0, - data: VecDeque::new(), - todo_dup: VecDeque::new(), - todo_read: VecDeque::new(), - todo_write: VecDeque::new(), - }; - - if handle.is_connected() { - handle.seq = self.rng.gen(); - handle.ack = 0; - handle.state = State::SynSent; - - let tcp = handle.create_tcp(TCP_SYN, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?; - - handle.seq += 1; - } - - self.ports.insert(local.1, 1); - - let id = self.next_id; - self.next_id += 1; - - self.handles.insert(id, Handle::Tcp(handle)); - - Ok(id) - } - - fn dup(&mut self, file: usize, buf: &[u8]) -> Result { - let handle = match *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - Handle::Tcp(ref mut handle) => { - let mut new_handle = TcpHandle { - local: handle.local, - remote: handle.remote, - flags: handle.flags, - events: 0, - read_timeout: handle.read_timeout, - write_timeout: handle.write_timeout, - ttl: handle.ttl, - state: handle.state, - seq: handle.seq, - ack: handle.ack, - data: VecDeque::new(), - todo_dup: VecDeque::new(), - todo_read: VecDeque::new(), - todo_write: VecDeque::new(), - }; - - let path = str::from_utf8(buf).or(Err(Error::new(EINVAL)))?; - - if path == "ttl" { - Handle::Setting(file, SettingKind::Ttl) - } else if path == "read_timeout" { - Handle::Setting(file, SettingKind::ReadTimeout) - } else if path == "write_timeout" { - Handle::Setting(file, SettingKind::WriteTimeout) - } else if path == "listen" { - if handle.is_connected() { - return Err(Error::new(EISCONN)); - } else if let Some((ip, tcp)) = handle.data.pop_front() { - new_handle.remote = (ip.header.src, tcp.header.src.get()); - - new_handle.seq = self.rng.gen(); - new_handle.ack = tcp.header.sequence.get() + 1; - new_handle.state = State::SynReceived; - - let tcp = new_handle.create_tcp(TCP_SYN | TCP_ACK, Vec::new()); - let ip = new_handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO))).and(Ok(buf.len()))?; - - new_handle.seq += 1; - } else { - return Err(Error::new(EWOULDBLOCK)); - } - - handle.data.retain(|&(ref ip, ref tcp)| { - if new_handle.matches(ip, tcp) { - false - } else { - true - } - }); - - Handle::Tcp(new_handle) - } else if path.is_empty() { - new_handle.data = handle.data.clone(); - - Handle::Tcp(new_handle) - } else if handle.is_connected() { - return Err(Error::new(EISCONN)); - } else { - new_handle.remote = parse_socket(path); - - if new_handle.is_connected() { - new_handle.seq = self.rng.gen(); - new_handle.ack = 0; - new_handle.state = State::SynSent; - - handle.data.retain(|&(ref ip, ref tcp)| { - if new_handle.matches(ip, tcp) { - new_handle.data.push_back((ip.clone(), tcp.clone())); - false - } else { - true - } - }); - - let tcp = new_handle.create_tcp(TCP_SYN, Vec::new()); - let ip = new_handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO))).and(Ok(buf.len()))?; - - new_handle.seq += 1; - - Handle::Tcp(new_handle) - } else { - return Err(Error::new(EINVAL)); - } - } - }, - Handle::Setting(file, kind) => { - Handle::Setting(file, kind) - } - }; - - let id = self.next_id; - self.next_id += 1; - - self.handles.insert(id, handle); - - Ok(id) - } - - fn read(&mut self, file: usize, buf: &mut [u8]) -> Result { - let (file, kind) = match *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - Handle::Tcp(ref mut handle) => { - if ! handle.is_connected() { - return Err(Error::new(ENOTCONN)); - } else if let Some((ip, mut tcp)) = handle.data.pop_front() { - let len = std::cmp::min(buf.len(), tcp.data.len()); - for (i, c) in tcp.data.drain(0..len).enumerate() { - buf[i] = c; - } - if !tcp.data.is_empty() { - handle.data.push_front((ip, tcp)); - } - - return Ok(len); - } else if handle.flags & O_NONBLOCK == O_NONBLOCK || handle.read_closed() { - return Ok(0); - } else { - return Err(Error::new(EWOULDBLOCK)); - } - }, - Handle::Setting(file, kind) => { - (file, kind) - } - }; - - if let Handle::Tcp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - let get_timeout = |timeout: &Option, buf: &mut [u8]| -> Result { - if let Some(ref timespec) = *timeout { - timespec.deref().read(buf).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO))) - } else { - Ok(0) - } - }; - - match kind { - SettingKind::Ttl => { - if let Some(mut ttl) = buf.get_mut(0) { - *ttl = handle.ttl; - Ok(1) - } else { - Ok(0) - } - }, - SettingKind::ReadTimeout => { - get_timeout(&handle.read_timeout, buf) - }, - SettingKind::WriteTimeout => { - get_timeout(&handle.write_timeout, buf) - } - } - } else { - Err(Error::new(EBADF)) - } - } - - fn write(&mut self, file: usize, buf: &[u8]) -> Result { - let (file, kind) = match *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - Handle::Tcp(ref mut handle) => { - if ! handle.is_connected() { - return Err(Error::new(ENOTCONN)); - } else if buf.len() >= 65507 { - return Err(Error::new(EMSGSIZE)); - } else { - match handle.state { - State::Established => { - let tcp = handle.create_tcp(TCP_ACK | TCP_PSH, buf.to_vec()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?; - handle.seq += buf.len() as u32; - return Ok(buf.len()); - }, - _ => { - return Err(Error::new(EWOULDBLOCK)); - } - } - } - }, - Handle::Setting(file, kind) => { - (file, kind) - } - }; - - if let Handle::Tcp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - let set_timeout = |timeout: &mut Option, buf: &[u8]| -> Result { - if buf.len() >= mem::size_of::() { - let mut timespec = TimeSpec::default(); - let count = timespec.deref_mut().write(buf).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?; - *timeout = Some(timespec); - Ok(count) - } else { - *timeout = None; - Ok(0) - } - }; - - match kind { - SettingKind::Ttl => { - if let Some(ttl) = buf.get(0) { - handle.ttl = *ttl; - Ok(1) - } else { - Ok(0) - } - }, - SettingKind::ReadTimeout => { - set_timeout(&mut handle.read_timeout, buf) - }, - SettingKind::WriteTimeout => { - set_timeout(&mut handle.write_timeout, buf) - } - } - } else { - Err(Error::new(EBADF)) - } - } - - fn fcntl(&mut self, file: usize, cmd: usize, arg: usize) -> Result { - if let Handle::Tcp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - match cmd { - F_GETFL => Ok(handle.flags), - F_SETFL => { - handle.flags = arg & ! O_ACCMODE; - Ok(0) - }, - _ => Err(Error::new(EINVAL)) - } - } else { - Err(Error::new(EBADF)) - } - } - - fn fevent(&mut self, file: usize, flags: usize) -> Result { - if let Handle::Tcp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - handle.events = flags; - Ok(file) - } else { - Err(Error::new(EBADF)) - } - } - - fn fpath(&mut self, file: usize, buf: &mut [u8]) -> Result { - if let Handle::Tcp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - let path_string = format!("udp:{}:{}/{}:{}", handle.remote.0.to_string(), handle.remote.1, handle.local.0.to_string(), handle.local.1); - let path = path_string.as_bytes(); - - let mut i = 0; - while i < buf.len() && i < path.len() { - buf[i] = path[i]; - i += 1; - } - - Ok(i) - } else { - Err(Error::new(EBADF)) - } - } - - fn fsync(&mut self, file: usize) -> Result { - let _handle = self.handles.get(&file).ok_or(Error::new(EBADF))?; - - Ok(0) - } - - fn close(&mut self, file: usize) -> Result { - let closed = { - if let Handle::Tcp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - handle.data.clear(); - - match handle.state { - State::SynReceived | State::Established => { - handle.state = State::FinWait1; - - let tcp = handle.create_tcp(TCP_FIN | TCP_ACK, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?; - - handle.seq += 1; - - false - }, - State::CloseWait => { - handle.state = State::LastAck; - - let tcp = handle.create_tcp(TCP_FIN | TCP_ACK, Vec::new()); - let ip = handle.create_ip(self.rng.gen(), tcp.to_bytes()); - self.tcp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?; - - handle.seq += 1; - - false - }, - _ => true - } - } else { - true - } - }; - - if closed { - if let Handle::Tcp(handle) = self.handles.remove(&file).ok_or(Error::new(EBADF))? { - let remove = if let Some(mut port) = self.ports.get_mut(&handle.local.1) { - *port = *port + 1; - *port == 0 - } else { - false - }; - - if remove { - self.ports.remove(&handle.local.1); - } - } - } - - Ok(0) - } -} - -fn daemon(scheme_fd: usize, tcp_fd: usize, time_fd: usize) { - let scheme_file = unsafe { File::from_raw_fd(scheme_fd) }; - let tcp_file = unsafe { File::from_raw_fd(tcp_fd) }; - let time_file = unsafe { File::from_raw_fd(time_fd) }; - - let tcpd = Rc::new(RefCell::new(Tcpd::new(scheme_file, tcp_file, time_file))); - - let mut event_queue = EventQueue::<()>::new().expect("tcpd: failed to create event queue"); - - let time_tcpd = tcpd.clone(); - event_queue.add(time_fd, move |_count: usize| -> io::Result> { - time_tcpd.borrow_mut().time_event()?; - Ok(None) - }).expect("tcpd: failed to listen to events on time:"); - - let tcp_tcpd = tcpd.clone(); - event_queue.add(tcp_fd, move |_count: usize| -> io::Result> { - tcp_tcpd.borrow_mut().tcp_event()?; - Ok(None) - }).expect("tcpd: failed to listen to events on ip:6"); - - event_queue.add(scheme_fd, move |_count: usize| -> io::Result> { - tcpd.borrow_mut().scheme_event()?; - Ok(None) - }).expect("tcpd: failed to listen to events on :tcp"); - - event_queue.trigger_all(0).expect("tcpd: failed to trigger event queue"); - - event_queue.run().expect("tcpd: failed to run event queue"); -} - -fn main() { - let time_path = format!("time:{}", CLOCK_MONOTONIC); - match syscall::open(&time_path, O_RDWR) { - Ok(time_fd) => { - match syscall::open("ip:6", O_RDWR | O_NONBLOCK) { - Ok(tcp_fd) => { - // Daemonize - if unsafe { syscall::clone(0).unwrap() } == 0 { - match syscall::open(":tcp", O_RDWR | O_CREAT | O_NONBLOCK) { - Ok(scheme_fd) => { - daemon(scheme_fd, tcp_fd, time_fd); - }, - Err(err) => { - println!("tcpd: failed to create tcp scheme: {}", err); - process::exit(1); - } - } - } - }, - Err(err) => { - println!("tcpd: failed to open ip:6: {}", err); - process::exit(1); - } - } - }, - Err(err) => { - println!("tcpd: failed to open {}: {}", time_path, err); - process::exit(1); - } - } -} diff --git a/schemes/udpd/Cargo.toml b/schemes/udpd/Cargo.toml deleted file mode 100644 index d7dc3e3..0000000 --- a/schemes/udpd/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "udpd" -version = "0.1.0" - -[dependencies] -netutils = { git = "https://github.com/redox-os/netutils.git" } -rand = "0.3" -redox_event = { git = "https://github.com/redox-os/event.git" } -redox_syscall = "0.1" diff --git a/schemes/udpd/src/main.rs b/schemes/udpd/src/main.rs deleted file mode 100644 index 23d6479..0000000 --- a/schemes/udpd/src/main.rs +++ /dev/null @@ -1,586 +0,0 @@ -extern crate event; -extern crate netutils; -extern crate rand; -extern crate syscall; - -use rand::{Rng, OsRng}; -use std::collections::{BTreeMap, VecDeque}; -use std::cell::RefCell; -use std::fs::File; -use std::io::{self, Read, Write}; -use std::{mem, process, slice, str}; -use std::ops::{Deref, DerefMut}; -use std::os::unix::io::FromRawFd; -use std::rc::Rc; - -use event::EventQueue; -use netutils::{n16, Ipv4, Ipv4Addr, Ipv4Header, Checksum}; -use netutils::udp::{Udp, UdpHeader}; -use syscall::data::{Packet, TimeSpec}; -use syscall::error::{Error, Result, EACCES, EADDRINUSE, EBADF, EIO, EINVAL, EMSGSIZE, ENOTCONN, ETIMEDOUT, EWOULDBLOCK}; -use syscall::flag::{CLOCK_MONOTONIC, EVENT_READ, F_GETFL, F_SETFL, O_ACCMODE, O_CREAT, O_RDWR, O_NONBLOCK}; -use syscall::number::{SYS_READ, SYS_WRITE}; -use syscall::scheme::SchemeMut; - -fn add_time(a: &TimeSpec, b: &TimeSpec) -> TimeSpec { - let mut secs = a.tv_sec + b.tv_sec; - - let mut nsecs = a.tv_nsec + b.tv_nsec; - while nsecs >= 1000000000 { - nsecs -= 1000000000; - secs += 1; - } - - TimeSpec { - tv_sec: secs, - tv_nsec: nsecs - } -} - -fn parse_socket(socket: &str) -> (Ipv4Addr, u16) { - let mut socket_parts = socket.split(":"); - let host = Ipv4Addr::from_str(socket_parts.next().unwrap_or("")); - let port = socket_parts.next().unwrap_or("").parse::().unwrap_or(0); - (host, port) -} - -struct UdpHandle { - local: (Ipv4Addr, u16), - remote: (Ipv4Addr, u16), - flags: usize, - events: usize, - read_timeout: Option, - write_timeout: Option, - ttl: u8, - data: VecDeque>, - todo: VecDeque<(Option, Packet)>, -} - -#[derive(Copy, Clone)] -enum SettingKind { - Ttl, - ReadTimeout, - WriteTimeout -} - -enum Handle { - Udp(UdpHandle), - Setting(usize, SettingKind), -} - -struct Udpd { - scheme_file: File, - udp_file: File, - time_file: File, - ports: BTreeMap, - next_id: usize, - handles: BTreeMap, - rng: OsRng, -} - -impl Udpd { - fn new(scheme_file: File, udp_file: File, time_file: File) -> Self { - Udpd { - scheme_file: scheme_file, - udp_file: udp_file, - time_file: time_file, - ports: BTreeMap::new(), - next_id: 1, - handles: BTreeMap::new(), - rng: OsRng::new().expect("udpd: failed to open RNG") - } - } - - fn scheme_event(&mut self) -> io::Result<()> { - loop { - let mut packet = Packet::default(); - if self.scheme_file.read(&mut packet)? == 0 { - break; - } - - let a = packet.a; - self.handle(&mut packet); - if packet.a == (-EWOULDBLOCK) as usize { - packet.a = a; - if let Some(mut handle) = self.handles.get_mut(&packet.b) { - if let Handle::Udp(ref mut handle) = *handle { - let timeout = match packet.a { - SYS_READ => match handle.read_timeout { - Some(read_timeout) => { - let mut time = TimeSpec::default(); - syscall::clock_gettime(CLOCK_MONOTONIC, &mut time).map_err(|err| io::Error::from_raw_os_error(err.errno))?; - - let timeout = add_time(&time, &read_timeout); - self.time_file.write(&timeout)?; - Some(timeout) - }, - None => None - }, - SYS_WRITE => match handle.write_timeout { - Some(write_timeout) => { - let mut time = TimeSpec::default(); - syscall::clock_gettime(CLOCK_MONOTONIC, &mut time).map_err(|err| io::Error::from_raw_os_error(err.errno))?; - - let timeout = add_time(&time, &write_timeout); - self.time_file.write(&timeout)?; - Some(timeout) - }, - None => None - }, - _ => None - }; - - handle.todo.push_back((timeout, packet)); - } - } - } else { - self.scheme_file.write(&packet)?; - } - } - - Ok(()) - } - - fn udp_event(&mut self) -> io::Result<()> { - loop { - let mut bytes = [0; 65536]; - let count = self.udp_file.read(&mut bytes)?; - if count == 0 { - break; - } - if let Some(ip) = Ipv4::from_bytes(&bytes[.. count]) { - if let Some(udp) = Udp::from_bytes(&ip.data) { - for (id, handle) in self.handles.iter_mut() { - if let Handle::Udp(ref mut handle) = *handle { - // Local address not set or IP dst matches or is broadcast - if (handle.local.0 == Ipv4Addr::NULL || ip.header.dst == handle.local.0 || ip.header.dst == Ipv4Addr::BROADCAST) - // Local port matches UDP dst - && udp.header.dst.get() == handle.local.1 - // Remote address not set or is broadcast, or IP src matches - && (handle.remote.0 == Ipv4Addr::NULL || handle.remote.0 == Ipv4Addr::BROADCAST || ip.header.src == handle.remote.0) - // Remote port not set or UDP src matches - && (handle.remote.1 == 0 || udp.header.src.get() == handle.remote.1) - { - handle.data.push_back(udp.data.clone()); - - while ! handle.todo.is_empty() && ! handle.data.is_empty() { - let (_timeout, mut packet) = handle.todo.pop_front().unwrap(); - let buf = unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }; - let data = handle.data.pop_front().unwrap(); - - let mut i = 0; - while i < buf.len() && i < data.len() { - buf[i] = data[i]; - i += 1; - } - packet.a = i; - - self.scheme_file.write(&packet)?; - } - - if handle.events & EVENT_READ == EVENT_READ { - if let Some(data) = handle.data.get(0) { - self.scheme_file.write(&Packet { - id: 0, - pid: 0, - uid: 0, - gid: 0, - a: syscall::number::SYS_FEVENT, - b: *id, - c: EVENT_READ, - d: data.len() - })?; - } - } - } - } - } - } - } - } - - Ok(()) - } - - fn time_event(&mut self) -> io::Result<()> { - let mut time = TimeSpec::default(); - if self.time_file.read(&mut time)? < mem::size_of::() { - return Err(io::Error::from_raw_os_error(EINVAL)); - } - - for (_id, handle) in self.handles.iter_mut() { - if let Handle::Udp(ref mut handle) = *handle { - let mut i = 0; - while i < handle.todo.len() { - if let Some(timeout) = handle.todo.get(i).map(|e| e.0.clone()).unwrap_or(None) { - if time.tv_sec > timeout.tv_sec || (time.tv_sec == timeout.tv_sec && time.tv_nsec >= timeout.tv_nsec) { - let (_timeout, mut packet) = handle.todo.remove(i).unwrap(); - packet.a = (-ETIMEDOUT) as usize; - self.scheme_file.write(&packet)?; - } else { - i += 1; - } - } else { - i += 1; - } - } - } - } - - Ok(()) - } -} - -impl SchemeMut for Udpd { - fn open(&mut self, url: &[u8], flags: usize, uid: u32, _gid: u32) -> Result { - let path = str::from_utf8(url).or(Err(Error::new(EINVAL)))?; - - let mut parts = path.split("/"); - let remote = parse_socket(parts.next().unwrap_or("")); - let mut local = parse_socket(parts.next().unwrap_or("")); - - if local.1 == 0 { - local.1 = self.rng.gen_range(32768, 65535); - } - - if local.1 <= 1024 && uid != 0 { - return Err(Error::new(EACCES)); - } - - if self.ports.contains_key(&local.1) { - return Err(Error::new(EADDRINUSE)); - } - - self.ports.insert(local.1, 1); - - let id = self.next_id; - self.next_id += 1; - - self.handles.insert(id, Handle::Udp(UdpHandle { - local: local, - remote: remote, - flags: flags, - events: 0, - ttl: 64, - read_timeout: None, - write_timeout: None, - data: VecDeque::new(), - todo: VecDeque::new(), - })); - - Ok(id) - } - - fn dup(&mut self, file: usize, buf: &[u8]) -> Result { - let handle = match *self.handles.get(&file).ok_or(Error::new(EBADF))? { - Handle::Udp(ref handle) => { - let mut handle = UdpHandle { - local: handle.local, - remote: handle.remote, - flags: handle.flags, - events: 0, - ttl: handle.ttl, - read_timeout: handle.read_timeout, - write_timeout: handle.write_timeout, - data: handle.data.clone(), - todo: VecDeque::new(), - }; - - let path = str::from_utf8(buf).or(Err(Error::new(EINVAL)))?; - - if path == "ttl" { - Handle::Setting(file, SettingKind::Ttl) - } else if path == "read_timeout" { - Handle::Setting(file, SettingKind::ReadTimeout) - } else if path == "write_timeout" { - Handle::Setting(file, SettingKind::WriteTimeout) - } else { - if handle.remote.0 == Ipv4Addr::NULL || handle.remote.1 == 0 { - handle.remote = parse_socket(path); - } - - if let Some(mut port) = self.ports.get_mut(&handle.local.1) { - *port = *port + 1; - } - - Handle::Udp(handle) - } - }, - Handle::Setting(file, kind) => { - Handle::Setting(file, kind) - } - }; - - let id = self.next_id; - self.next_id += 1; - - self.handles.insert(id, handle); - - Ok(id) - } - - fn read(&mut self, file: usize, buf: &mut [u8]) -> Result { - let (file, kind) = match *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - Handle::Udp(ref mut handle) => { - if handle.remote.0 == Ipv4Addr::NULL || handle.remote.1 == 0 { - return Err(Error::new(ENOTCONN)); - } else if let Some(data) = handle.data.pop_front() { - let mut i = 0; - while i < buf.len() && i < data.len() { - buf[i] = data[i]; - i += 1; - } - - return Ok(i); - } else if handle.flags & O_NONBLOCK == O_NONBLOCK { - return Ok(0); - } else { - return Err(Error::new(EWOULDBLOCK)); - } - }, - Handle::Setting(file, kind) => { - (file, kind) - } - }; - - if let Handle::Udp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - let get_timeout = |timeout: &Option, buf: &mut [u8]| -> Result { - if let Some(ref timespec) = *timeout { - timespec.deref().read(buf).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO))) - } else { - Ok(0) - } - }; - - match kind { - SettingKind::Ttl => { - if let Some(mut ttl) = buf.get_mut(0) { - *ttl = handle.ttl; - Ok(1) - } else { - Ok(0) - } - }, - SettingKind::ReadTimeout => { - get_timeout(&handle.read_timeout, buf) - }, - SettingKind::WriteTimeout => { - get_timeout(&handle.write_timeout, buf) - } - } - } else { - Err(Error::new(EBADF)) - } - } - - fn write(&mut self, file: usize, buf: &[u8]) -> Result { - let (file, kind) = match *self.handles.get(&file).ok_or(Error::new(EBADF))? { - Handle::Udp(ref handle) => { - if handle.remote.0 == Ipv4Addr::NULL || handle.remote.1 == 0 { - return Err(Error::new(ENOTCONN)); - } else if buf.len() >= 65507 { - return Err(Error::new(EMSGSIZE)); - } else { - let udp_data = buf.to_vec(); - - let udp = Udp { - header: UdpHeader { - src: n16::new(handle.local.1), - dst: n16::new(handle.remote.1), - len: n16::new((udp_data.len() + mem::size_of::()) as u16), - checksum: Checksum { data: 0 } - }, - data: udp_data - }; - - let ip_data = udp.to_bytes(); - - let ip = Ipv4 { - header: Ipv4Header { - ver_hlen: 0x45, - services: 0, - len: n16::new((ip_data.len() + mem::size_of::()) as u16), - id: n16::new(self.rng.gen()), - flags_fragment: n16::new(0), - ttl: handle.ttl, - proto: 0x11, - checksum: Checksum { data: 0 }, - src: handle.local.0, - dst: handle.remote.0 - }, - options: Vec::new(), - data: ip_data - }; - - return self.udp_file.write(&ip.to_bytes()).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO))).and(Ok(buf.len())); - } - }, - Handle::Setting(file, kind) => { - (file, kind) - } - }; - - if let Handle::Udp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - let set_timeout = |timeout: &mut Option, buf: &[u8]| -> Result { - if buf.len() >= mem::size_of::() { - let mut timespec = TimeSpec::default(); - let count = timespec.deref_mut().write(buf).map_err(|err| Error::new(err.raw_os_error().unwrap_or(EIO)))?; - *timeout = Some(timespec); - Ok(count) - } else { - *timeout = None; - Ok(0) - } - }; - - match kind { - SettingKind::Ttl => { - if let Some(ttl) = buf.get(0) { - handle.ttl = *ttl; - Ok(1) - } else { - Ok(0) - } - }, - SettingKind::ReadTimeout => { - set_timeout(&mut handle.read_timeout, buf) - }, - SettingKind::WriteTimeout => { - set_timeout(&mut handle.write_timeout, buf) - } - } - } else { - Err(Error::new(EBADF)) - } - } - - fn fcntl(&mut self, file: usize, cmd: usize, arg: usize) -> Result { - if let Handle::Udp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - match cmd { - F_GETFL => Ok(handle.flags), - F_SETFL => { - handle.flags = arg & ! O_ACCMODE; - Ok(0) - }, - _ => Err(Error::new(EINVAL)) - } - } else { - Err(Error::new(EBADF)) - } - } - - fn fevent(&mut self, file: usize, flags: usize) -> Result { - if let Handle::Udp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - handle.events = flags; - Ok(file) - } else { - Err(Error::new(EBADF)) - } - } - - fn fpath(&mut self, file: usize, buf: &mut [u8]) -> Result { - if let Handle::Udp(ref mut handle) = *self.handles.get_mut(&file).ok_or(Error::new(EBADF))? { - let path_string = format!("udp:{}:{}/{}:{}", handle.remote.0.to_string(), handle.remote.1, handle.local.0.to_string(), handle.local.1); - let path = path_string.as_bytes(); - - let mut i = 0; - while i < buf.len() && i < path.len() { - buf[i] = path[i]; - i += 1; - } - - Ok(i) - } else { - Err(Error::new(EBADF)) - } - } - - fn fsync(&mut self, file: usize) -> Result { - let _handle = self.handles.get(&file).ok_or(Error::new(EBADF))?; - - Ok(0) - } - - fn close(&mut self, file: usize) -> Result { - let handle = self.handles.remove(&file).ok_or(Error::new(EBADF))?; - - if let Handle::Udp(ref handle) = handle { - let remove = if let Some(mut port) = self.ports.get_mut(&handle.local.1) { - *port = *port + 1; - *port == 0 - } else { - false - }; - - if remove { - drop(self.ports.remove(&handle.local.1)); - } - } - - drop(handle); - - Ok(0) - } -} -fn daemon(scheme_fd: usize, udp_fd: usize, time_fd: usize) { - let scheme_file = unsafe { File::from_raw_fd(scheme_fd) }; - let udp_file = unsafe { File::from_raw_fd(udp_fd) }; - let time_file = unsafe { File::from_raw_fd(time_fd) }; - - let udpd = Rc::new(RefCell::new(Udpd::new(scheme_file, udp_file, time_file))); - - let mut event_queue = EventQueue::<()>::new().expect("udpd: failed to create event queue"); - - let time_udpd = udpd.clone(); - event_queue.add(time_fd, move |_count: usize| -> io::Result> { - time_udpd.borrow_mut().time_event()?; - Ok(None) - }).expect("udpd: failed to listen to events on time:"); - - let udp_udpd = udpd.clone(); - event_queue.add(udp_fd, move |_count: usize| -> io::Result> { - udp_udpd.borrow_mut().udp_event()?; - Ok(None) - }).expect("udpd: failed to listen to events on ip:11"); - - event_queue.add(scheme_fd, move |_count: usize| -> io::Result> { - udpd.borrow_mut().scheme_event()?; - Ok(None) - }).expect("udpd: failed to listen to events on :udp"); - - event_queue.trigger_all(0).expect("udpd: failed to trigger event queue"); - - event_queue.run().expect("udpd: failed to run event queue"); -} - -fn main() { - let time_path = format!("time:{}", CLOCK_MONOTONIC); - match syscall::open(&time_path, O_RDWR) { - Ok(time_fd) => { - match syscall::open("ip:11", O_RDWR | O_NONBLOCK) { - Ok(udp_fd) => { - // Daemonize - if unsafe { syscall::clone(0).unwrap() } == 0 { - match syscall::open(":udp", O_RDWR | O_CREAT | O_NONBLOCK) { - Ok(scheme_fd) => { - daemon(scheme_fd, udp_fd, time_fd); - }, - Err(err) => { - println!("udpd: failed to create udp scheme: {}", err); - process::exit(1); - } - } - } - }, - Err(err) => { - println!("udpd: failed to open ip:11: {}", err); - process::exit(1); - } - } - }, - Err(err) => { - println!("udpd: failed to open {}: {}", time_path, err); - process::exit(1); - } - } -}