# Copyright 2018 the Deno authors. All rights reserved. MIT license. # Dependencies between third party crates is mapped out here manually. This is # not so difficult and having it be tedious to add dependencies might help us # avoid dependency hell later on. Always try to minimize dependencies. # Versioning for third party rust crates is controlled in //Cargo.toml # Use //tools/sync_third_party.py instead of running "cargo install". import("rust.gni") crates = "//third_party/rust_crates" registry_github = "$crates/registry/src/github.com-1ecc6299db9ec823/" rust_crate("libc") { source_root = "$registry_github/libc-0.2.42/src/lib.rs" features = [ "use_std" ] } rust_crate("url") { source_root = "$registry_github/url-1.7.1/src/lib.rs" extern = [ ":matches", ":idna", ":percent_encoding", ] } rust_crate("percent_encoding") { source_root = "$registry_github/percent-encoding-1.0.1/lib.rs" args = [ # TODO: Suppress some warnings at this moment # This should be removed when it's fixed in servo/rust-url repository # https://github.com/servo/rust-url/issues/455 "-Aunused-imports", "-Adeprecated", ] } rust_crate("matches") { source_root = "$registry_github/matches-0.1.7/lib.rs" } rust_crate("idna") { source_root = "$registry_github/idna-0.1.5/src/lib.rs" extern = [ ":matches", ":unicode_bidi", ":unicode_normalization", ] } rust_crate("unicode_bidi") { source_root = "$registry_github/unicode-bidi-0.3.4/src/lib.rs" extern = [ ":matches" ] } rust_crate("unicode_normalization") { source_root = "$registry_github/unicode-normalization-0.1.7/src/lib.rs" } rust_crate("log") { source_root = "$registry_github/log-0.4.3/src/lib.rs" extern = [ ":cfg_if" ] } rust_crate("cfg_if") { source_root = "$registry_github/cfg-if-0.1.4/src/lib.rs" } rust_crate("sha1") { source_root = "$registry_github/sha1-0.6.0/src/lib.rs" } rust_crate("tempfile") { source_root = "$registry_github/tempfile-3.0.3/src/lib.rs" extern = [ ":libc", ":rand", ":remove_dir_all", ":winapi", ] } rust_crate("rand") { source_root = "$registry_github/rand-0.5.4/src/lib.rs" features = [ "std", "alloc", ] extern = [ ":libc", ":rand_core", ":winapi", ] if (is_mac) { libs = [ "Security.framework" ] } } rust_crate("rand_core") { source_root = "$registry_github/rand_core-0.2.1/src/lib.rs" } rust_crate("remove_dir_all") { source_root = "$registry_github/remove_dir_all-0.5.1/src/lib.rs" extern = [ ":winapi" ] } rust_crate("winapi") { source_root = "$registry_github/winapi-0.3.5/src/lib.rs" features = [ "basetsd", "cfg", "cfgmgr32", "errhandlingapi", "excpt", "fileapi", "guiddef", "handleapi", "inaddr", "in6addr", "ktmtypes", "libloaderapi", "lsalookup", "minwinbase", "minwindef", "mstcpip", "ntdef", "ntsecapi", "ntstatus", "processthreadsapi", "profileapi", "qos", "rpcndr", "sspi", "std", "subauth", "vadefs", "vcruntime", "winbase", "wincred", "windef", "winerror", "winnt", "winreg", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip", "wtypes", "wtypesbase", ] } # Old version of the 'winapi' crate, required by 'mio', 'miow', and 'iovec'. # This exceptional! Generally we don't allow multiple versions of a crate. # TODO: Remove this dependency. https://github.com/denoland/deno/issues/484 rust_crate("winapi-0.2") { crate_name = "winapi" crate_version = "0.2" source_root = "$registry_github/winapi-0.2.8/src/lib.rs" } # TODO: Remove this crate together with crate 'winapi-0.2'. rust_crate("kernel32") { source_root = "$registry_github/kernel32-sys-0.2.2/src/lib.rs" extern_version = [ { label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, ] } # TODO: Remove this crate together with crate 'winapi-0.2'. rust_crate("ws2_32") { source_root = "$registry_github/ws2_32-sys-0.2.1/src/lib.rs" extern_version = [ { label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, ] } rust_crate("futures") { source_root = "$registry_github/futures-0.1.23/src/lib.rs" features = [ "use_std", "with-deprecated", ] } rust_crate("mio") { source_root = "$registry_github/mio-0.6.15/src/lib.rs" features = [ "default", "with-deprecated", ] extern = [ ":iovec", ":kernel32", ":lazycell", ":libc", ":log", ":miow", ":net2", ":slab", ] # TODO: Upgrade to a current version of the 'winapi' crate. # See https://github.com/denoland/deno/issues/484. extern_version = [ { label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, ] } rust_crate("miow") { source_root = "$registry_github/miow-0.2.1/src/lib.rs" extern = [ ":kernel32", ":net2", ":ws2_32", ] # TODO: Upgrade to a current version of the 'winapi' crate. # See https://github.com/denoland/deno/issues/484. extern_version = [ { label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, ] } rust_crate("iovec") { source_root = "$registry_github/iovec-0.1.2/src/lib.rs" extern = [ ":libc" ] # TODO: Upgrade to a current version of the 'winapi' crate. # See https://github.com/denoland/deno/issues/484. extern_version = [ { label = ":winapi-0.2" crate_name = "winapi" crate_version = "0.2" }, ] } rust_crate("lazycell") { source_root = "$registry_github/lazycell-0.6.0/src/lib.rs" } rust_crate("net2") { source_root = "$registry_github/net2-0.2.33/src/lib.rs" features = [ "default", "duration", ] extern = [ ":cfg_if", ":libc", ":winapi", ] } rust_crate("slab") { source_root = "$registry_github/slab-0.4.0/src/lib.rs" } rust_crate("bytes") { source_root = "$registry_github/bytes-0.4.9/src/lib.rs" extern = [ ":byteorder", ":iovec", ] } rust_crate("byteorder") { source_root = "$registry_github/byteorder-1.2.4/src/lib.rs" } rust_crate("crossbeam_deque") { source_root = "$registry_github/crossbeam-deque-0.5.1/src/lib.rs" extern = [ ":crossbeam_epoch", ":crossbeam_utils", ] } rust_crate("crossbeam_epoch") { source_root = "$registry_github/crossbeam-epoch-0.5.1/src/lib.rs" features = [ "use_std" ] extern = [ ":arrayvec", ":cfg_if", ":crossbeam_utils", ":lazy_static", ":memoffset", ":scopeguard", ] } rust_crate("crossbeam_utils") { source_root = "$registry_github/crossbeam-utils-0.4.1/src/lib.rs" features = [ "use_std" ] extern = [ ":cfg_if" ] } rust_crate("arrayvec") { source_root = "$registry_github/arrayvec-0.4.7/src/lib.rs" extern = [ ":nodrop" ] } rust_crate("nodrop") { source_root = "$registry_github/nodrop-0.1.12/src/lib.rs" } rust_crate("lazy_static") { source_root = "$registry_github/lazy_static-1.0.2/src/lib.rs" } rust_crate("memoffset") { source_root = "$registry_github/memoffset-0.2.1/src/lib.rs" } rust_crate("scopeguard") { source_root = "$registry_github/scopeguard-0.3.3/src/lib.rs" features = [ "use_std" ] } rust_crate("num_cpus") { source_root = "$registry_github/num_cpus-1.8.0/src/lib.rs" extern = [ ":libc" ] } tokio_root = "$crates/git/checkouts/tokio-377c595163f99a10/5d0d2a2/" rust_crate("tokio") { source_root = "$tokio_root/src/lib.rs" extern = [ ":futures", ":mio", ":tokio_executor", ":tokio_fs", ":tokio_io", ":tokio_reactor", ":tokio_tcp", ":tokio_threadpool", ":tokio_current_thread", ":tokio_timer", ":tokio_udp", ] } rust_crate("tokio_executor") { source_root = "$tokio_root/tokio-executor/src/lib.rs" extern = [ ":futures" ] } rust_crate("tokio_current_thread") { source_root = "$tokio_root/tokio-current-thread/src/lib.rs" extern = [ ":tokio_executor", ":futures", ] } rust_crate("tokio_fs") { source_root = "$tokio_root//tokio-fs/src/lib.rs" extern = [ ":futures", ":tokio_io", ":tokio_threadpool", ] } rust_crate("tokio_io") { source_root = "$tokio_root/tokio-io/src/lib.rs" extern = [ ":bytes", ":futures", ":log", ] } rust_crate("tokio_timer") { source_root = "$tokio_root/tokio-timer/src/lib.rs" extern = [ ":futures", ":tokio_executor", ] } rust_crate("tokio_udp") { source_root = "$tokio_root/tokio-udp/src/lib.rs" extern = [ ":bytes", ":futures", ":log", ":mio", ":tokio_codec", ":tokio_io", ":tokio_reactor", ] } rust_crate("tokio_codec") { source_root = "$tokio_root/tokio-codec/src/lib.rs" extern = [ ":bytes", ":futures", ":tokio_io", ] } rust_crate("tokio_reactor") { source_root = "$tokio_root/tokio-reactor/src/lib.rs" extern = [ ":futures", ":log", ":mio", ":slab", ":tokio_executor", ":tokio_io", ] } rust_crate("tokio_tcp") { source_root = "$tokio_root/tokio-tcp/src/lib.rs" extern = [ ":bytes", ":futures", ":iovec", ":mio", ":tokio_io", ":tokio_reactor", ] } rust_crate("tokio_threadpool") { source_root = "$tokio_root/tokio-threadpool/src/lib.rs" extern = [ ":crossbeam_deque", ":crossbeam_utils", ":futures", ":log", ":num_cpus", ":rand", ":tokio_executor", ] }