1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/build_extra/rust/BUILD.gn

583 lines
11 KiB
Text
Raw Normal View History

2018-08-02 23:06:54 -04:00
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
2018-07-10 14:56:12 -04:00
# 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
2018-08-02 23:06:54 -04:00
# 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")
2018-07-10 14:56:12 -04:00
crates = "//third_party/rust_crates"
2018-08-02 23:06:54 -04:00
registry_github = "$crates/registry/src/github.com-1ecc6299db9ec823/"
2018-07-10 14:56:12 -04:00
2018-08-11 16:04:11 -04:00
rust_crate("libc") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/libc-0.2.42/src/lib.rs"
features = [ "use_std" ]
2018-07-10 14:56:12 -04:00
}
2018-08-11 16:04:11 -04:00
rust_crate("url") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/url-1.7.1/src/lib.rs"
2018-07-10 14:56:12 -04:00
extern = [
":matches",
":idna",
":percent_encoding",
]
}
2018-07-10 14:56:12 -04:00
2018-08-11 16:04:11 -04:00
rust_crate("percent_encoding") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/percent-encoding-1.0.1/lib.rs"
2018-07-21 11:00:09 -04:00
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",
]
2018-07-10 14:56:12 -04:00
}
2018-08-11 16:04:11 -04:00
rust_crate("matches") {
source_root = "$registry_github/matches-0.1.7/lib.rs"
2018-07-10 14:56:12 -04:00
}
2018-08-11 16:04:11 -04:00
rust_crate("idna") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/idna-0.1.5/src/lib.rs"
2018-07-10 14:56:12 -04:00
extern = [
":matches",
":unicode_bidi",
":unicode_normalization",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("unicode_bidi") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/unicode-bidi-0.3.4/src/lib.rs"
2018-07-10 14:56:12 -04:00
extern = [ ":matches" ]
}
2018-08-11 16:04:11 -04:00
rust_crate("unicode_normalization") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/unicode-normalization-0.1.7/src/lib.rs"
2018-07-10 14:56:12 -04:00
}
2018-07-16 21:27:37 -04:00
2018-08-11 16:04:11 -04:00
rust_crate("log") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/log-0.4.3/src/lib.rs"
2018-07-16 21:27:37 -04:00
extern = [ ":cfg_if" ]
}
2018-08-11 16:04:11 -04:00
rust_crate("cfg_if") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/cfg-if-0.1.4/src/lib.rs"
2018-07-16 21:27:37 -04:00
}
2018-07-24 01:45:23 -04:00
2018-08-11 16:04:11 -04:00
rust_crate("sha1") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/sha1-0.6.0/src/lib.rs"
2018-07-24 01:45:23 -04:00
}
2018-08-11 16:04:11 -04:00
rust_crate("tempfile") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/tempfile-3.0.3/src/lib.rs"
2018-07-24 01:45:23 -04:00
extern = [
":libc",
":rand",
":remove_dir_all",
":winapi",
2018-07-24 01:45:23 -04:00
]
}
2018-08-11 16:04:11 -04:00
rust_crate("rand") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/rand-0.5.4/src/lib.rs"
features = [
"std",
"alloc",
2018-07-24 01:45:23 -04:00
]
extern = [
":libc",
":rand_core",
":winapi",
]
2018-07-24 01:45:23 -04:00
if (is_mac) {
libs = [ "Security.framework" ]
}
}
2018-08-11 16:04:11 -04:00
rust_crate("rand_core") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/rand_core-0.2.1/src/lib.rs"
2018-07-24 01:45:23 -04:00
}
2018-08-11 16:04:11 -04:00
rust_crate("remove_dir_all") {
2018-08-02 23:06:54 -04:00
source_root = "$registry_github/remove_dir_all-0.5.1/src/lib.rs"
extern = [ ":winapi" ]
}
2018-08-11 16:04:11 -04:00
rust_crate("winapi") {
2018-08-02 23:06:54 -04:00
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",
2018-08-05 18:50:15 -04:00
"sysinfoapi",
"timezoneapi",
"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
2018-08-11 16:04:11 -04:00
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'.
2018-08-11 16:04:11 -04:00
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'.
2018-08-11 16:04:11 -04:00
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"
},
]
2018-07-24 01:45:23 -04:00
}
2018-08-11 16:04:11 -04:00
rust_crate("futures") {
source_root = "$registry_github/futures-0.1.23/src/lib.rs"
features = [
"use_std",
"with-deprecated",
]
}
2018-08-11 16:04:11 -04:00
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"
},
]
}
2018-08-11 16:04:11 -04:00
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"
},
]
}
2018-08-11 16:04:11 -04:00
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"
},
]
}
2018-08-11 16:04:11 -04:00
rust_crate("lazycell") {
source_root = "$registry_github/lazycell-0.6.0/src/lib.rs"
}
2018-08-11 16:04:11 -04:00
rust_crate("net2") {
source_root = "$registry_github/net2-0.2.33/src/lib.rs"
features = [
"default",
"duration",
]
extern = [
":cfg_if",
":libc",
":winapi",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("slab") {
source_root = "$registry_github/slab-0.4.0/src/lib.rs"
}
2018-08-11 16:04:11 -04:00
rust_crate("bytes") {
source_root = "$registry_github/bytes-0.4.9/src/lib.rs"
extern = [
":byteorder",
":iovec",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("byteorder") {
source_root = "$registry_github/byteorder-1.2.4/src/lib.rs"
}
2018-08-11 16:04:11 -04:00
rust_crate("crossbeam_deque") {
source_root = "$registry_github/crossbeam-deque-0.5.1/src/lib.rs"
extern = [
":crossbeam_epoch",
":crossbeam_utils",
]
}
2018-08-11 16:04:11 -04:00
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",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("crossbeam_utils") {
source_root = "$registry_github/crossbeam-utils-0.4.1/src/lib.rs"
features = [ "use_std" ]
extern = [ ":cfg_if" ]
}
2018-08-11 16:04:11 -04:00
rust_crate("arrayvec") {
source_root = "$registry_github/arrayvec-0.4.7/src/lib.rs"
extern = [ ":nodrop" ]
}
2018-08-11 16:04:11 -04:00
rust_crate("nodrop") {
source_root = "$registry_github/nodrop-0.1.12/src/lib.rs"
}
2018-08-11 16:04:11 -04:00
rust_crate("lazy_static") {
source_root = "$registry_github/lazy_static-1.0.2/src/lib.rs"
}
2018-08-11 16:04:11 -04:00
rust_crate("memoffset") {
source_root = "$registry_github/memoffset-0.2.1/src/lib.rs"
}
2018-08-11 16:04:11 -04:00
rust_crate("scopeguard") {
source_root = "$registry_github/scopeguard-0.3.3/src/lib.rs"
features = [ "use_std" ]
}
2018-08-11 16:04:11 -04:00
rust_crate("num_cpus") {
source_root = "$registry_github/num_cpus-1.8.0/src/lib.rs"
extern = [ ":libc" ]
}
2018-08-05 18:50:15 -04:00
rust_crate("hyper") {
source_root = "$registry_github/hyper-0.12.8/src/lib.rs"
features = [ "runtime" ]
extern = [
":bytes",
":futures",
":futures_cpupool",
":h2",
":http",
":httparse",
":iovec",
":itoa",
":log",
":net2",
":time",
":tokio",
":tokio_executor",
":tokio_io",
":tokio_reactor",
":tokio_tcp",
":tokio_timer",
":want",
]
}
rust_crate("tokio_core") {
source_root = "$registry_github/tokio-core-0.1.17/src/lib.rs"
extern = [
":mio",
":futures",
":tokio",
":tokio_executor",
":tokio_reactor",
":tokio_timer",
":tokio_io",
":log",
":iovec",
":bytes",
]
}
rust_crate("h2") {
source_root = "$registry_github/h2-0.1.12/src/lib.rs"
extern = [
":byteorder",
":bytes",
":fnv",
":futures",
":http",
":indexmap",
":log",
":slab",
":string",
":tokio_io",
]
}
rust_crate("http") {
source_root = "$registry_github/http-0.1.10/src/lib.rs"
extern = [
":bytes",
":fnv",
":itoa",
]
}
rust_crate("httparse") {
source_root = "$registry_github/httparse-1.3.2/src/lib.rs"
}
rust_crate("fnv") {
source_root = "$registry_github/fnv-1.0.6/lib.rs"
}
rust_crate("futures_core") {
source_root = "$registry_github/futures-core-0.2.1/src/lib.rs"
}
rust_crate("futures_cpupool") {
source_root = "$registry_github/futures-cpupool-0.1.8/src/lib.rs"
extern = [
":futures",
":num_cpus",
]
}
rust_crate("indexmap") {
source_root = "$registry_github/indexmap-1.0.1/src/lib.rs"
}
rust_crate("itoa") {
source_root = "$registry_github/itoa-0.4.2/src/lib.rs"
features = [ "std" ]
}
rust_crate("string") {
source_root = "$registry_github/string-0.1.1/src/lib.rs"
}
rust_crate("time") {
source_root = "$registry_github/time-0.1.40/src/lib.rs"
extern = [
":libc",
":winapi",
]
}
rust_crate("try_lock") {
source_root = "$registry_github/try-lock-0.2.2/src/lib.rs"
}
rust_crate("want") {
source_root = "$registry_github/want-0.0.6/src/lib.rs"
extern = [
":futures",
":try_lock",
":log",
]
}
tokio_root = "$crates/git/checkouts/tokio-377c595163f99a10/5d0d2a2/"
2018-08-11 16:04:11 -04:00
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",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_executor") {
source_root = "$tokio_root/tokio-executor/src/lib.rs"
extern = [ ":futures" ]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_current_thread") {
source_root = "$tokio_root/tokio-current-thread/src/lib.rs"
extern = [
":tokio_executor",
":futures",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_fs") {
source_root = "$tokio_root//tokio-fs/src/lib.rs"
extern = [
":futures",
":tokio_io",
":tokio_threadpool",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_io") {
source_root = "$tokio_root/tokio-io/src/lib.rs"
extern = [
":bytes",
":futures",
":log",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_timer") {
source_root = "$tokio_root/tokio-timer/src/lib.rs"
extern = [
":futures",
":tokio_executor",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_udp") {
source_root = "$tokio_root/tokio-udp/src/lib.rs"
extern = [
":bytes",
":futures",
":log",
":mio",
":tokio_codec",
":tokio_io",
":tokio_reactor",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_codec") {
source_root = "$tokio_root/tokio-codec/src/lib.rs"
extern = [
":bytes",
":futures",
":tokio_io",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_reactor") {
source_root = "$tokio_root/tokio-reactor/src/lib.rs"
extern = [
":futures",
":log",
":mio",
":slab",
":tokio_executor",
":tokio_io",
]
}
2018-08-11 16:04:11 -04:00
rust_crate("tokio_tcp") {
source_root = "$tokio_root/tokio-tcp/src/lib.rs"
extern = [
":bytes",
":futures",
":iovec",
":mio",
":tokio_io",
":tokio_reactor",
]
}
2018-08-11 16:04:11 -04:00
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",
]
}