2018-07-06 00:58:09 -04:00
|
|
|
import("rust.gni")
|
|
|
|
|
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
|
|
|
|
# avoid dependency hell later on.
|
|
|
|
# Versioning for third party rust crates is controlled in //gclient_config.py
|
|
|
|
# TODO(ry) Use Cargo for versioning?
|
|
|
|
|
|
|
|
crates = "//third_party/rust_crates"
|
|
|
|
|
2018-07-07 19:28:23 -04:00
|
|
|
rust_component("libc") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/libc-0.2.42/src/lib.rs"
|
2018-07-28 05:07:54 -04:00
|
|
|
features = [ "use_std" ]
|
2018-07-10 14:56:12 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("url") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/url-1.7.1/src/lib.rs"
|
2018-07-10 14:56:12 -04:00
|
|
|
extern = [
|
|
|
|
":matches",
|
|
|
|
":idna",
|
|
|
|
":percent_encoding",
|
2018-07-07 19:28:23 -04:00
|
|
|
]
|
|
|
|
}
|
2018-07-10 14:56:12 -04:00
|
|
|
|
|
|
|
rust_component("percent_encoding") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/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
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("matches") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/matches-0.1.6/lib.rs"
|
2018-07-10 14:56:12 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("idna") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/idna-0.1.5/src/lib.rs"
|
2018-07-10 14:56:12 -04:00
|
|
|
extern = [
|
|
|
|
":matches",
|
|
|
|
":unicode_bidi",
|
|
|
|
":unicode_normalization",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("unicode_bidi") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/unicode-bidi-0.3.4/src/lib.rs"
|
2018-07-10 14:56:12 -04:00
|
|
|
extern = [ ":matches" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("unicode_normalization") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/unicode-normalization-0.1.7/src/lib.rs"
|
2018-07-10 14:56:12 -04:00
|
|
|
}
|
2018-07-16 21:27:37 -04:00
|
|
|
|
|
|
|
rust_component("log") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/log-0.4.3/src/lib.rs"
|
2018-07-16 21:27:37 -04:00
|
|
|
extern = [ ":cfg_if" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("cfg_if") {
|
2018-07-18 20:00:53 -04:00
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.4/src/lib.rs"
|
2018-07-16 21:27:37 -04:00
|
|
|
}
|
2018-07-24 01:45:23 -04:00
|
|
|
|
|
|
|
rust_component("sha1") {
|
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/sha1-0.6.0/src/lib.rs"
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("tempfile") {
|
|
|
|
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/tempfile-3.0.3/src/lib.rs"
|
|
|
|
extern = [
|
|
|
|
":libc",
|
|
|
|
":rand",
|
|
|
|
":remove_dir_all",
|
2018-07-28 11:10:43 -04:00
|
|
|
":winapi",
|
2018-07-24 01:45:23 -04:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("rand") {
|
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/rand-0.5.4/src/lib.rs"
|
|
|
|
extern = [
|
|
|
|
":libc",
|
|
|
|
":rand_core",
|
|
|
|
]
|
2018-07-28 11:10:43 -04:00
|
|
|
if (is_win) {
|
|
|
|
extern += [ ":winapi" ]
|
|
|
|
}
|
2018-07-28 05:07:54 -04:00
|
|
|
features = [
|
|
|
|
"std",
|
|
|
|
"alloc",
|
2018-07-24 01:45:23 -04:00
|
|
|
]
|
|
|
|
if (is_mac) {
|
|
|
|
libs = [ "Security.framework" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("rand_core") {
|
|
|
|
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/rand_core-0.2.1/src/lib.rs"
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("remove_dir_all") {
|
|
|
|
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/remove_dir_all-0.5.1/src/lib.rs"
|
2018-07-28 11:10:43 -04:00
|
|
|
extern = []
|
|
|
|
if (is_win) {
|
|
|
|
extern += [ ":winapi" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rust_component("winapi") {
|
|
|
|
source_root =
|
|
|
|
"$crates/registry/src/github.com-1ecc6299db9ec823/winapi-0.3.5/src/lib.rs"
|
|
|
|
features = [
|
|
|
|
"basetsd",
|
|
|
|
"cfg",
|
|
|
|
"cfgmgr32",
|
|
|
|
"errhandlingapi",
|
|
|
|
"excpt",
|
|
|
|
"fileapi",
|
|
|
|
"guiddef",
|
|
|
|
"handleapi",
|
|
|
|
"ktmtypes",
|
|
|
|
"libloaderapi",
|
|
|
|
"lsalookup",
|
|
|
|
"minwinbase",
|
|
|
|
"minwindef",
|
|
|
|
"ntdef",
|
|
|
|
"ntsecapi",
|
|
|
|
"ntstatus",
|
|
|
|
"processthreadsapi",
|
|
|
|
"profileapi",
|
|
|
|
"sspi",
|
|
|
|
"std",
|
|
|
|
"subauth",
|
|
|
|
"vadefs",
|
|
|
|
"vcruntime",
|
|
|
|
"winbase",
|
|
|
|
"wincred",
|
|
|
|
"windef",
|
|
|
|
"winerror",
|
|
|
|
"winnt",
|
|
|
|
"winreg",
|
|
|
|
]
|
2018-07-24 01:45:23 -04:00
|
|
|
}
|