summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Madruga <robbymadruga@gmail.com>2018-07-28 17:46:27 -0700
committerBert Belder <bertbelder@gmail.com>2018-08-09 01:13:11 +0200
commit58b2362a241e19bf7c87a3d9ddf6975cf3feb2c3 (patch)
tree3b633baf78bc1399df2962d8d112015671fcc39d
parent942b3090e7963e0b6e198890362aa911ee940eee (diff)
Add 'tokio' and dependencies
Use tokio from git.
-rw-r--r--BUILD.gn31
-rw-r--r--Cargo.toml1
-rw-r--r--build_extra/rust/BUILD.gn227
m---------third_party0
4 files changed, 256 insertions, 3 deletions
diff --git a/BUILD.gn b/BUILD.gn
index fda094475..d1b5c63f7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -39,6 +39,7 @@ main_extern = [
"$rust_build:log",
"$rust_build:sha1",
"$rust_build:tempfile",
+ "$rust_build:tokio",
"$rust_build:url",
"//build_extra/flatbuffers/rust:flatbuffers",
":msg_rs",
@@ -50,13 +51,39 @@ main_extern = [
# * The `rust_test` and `rust_executable` templates only produce an object
# file, and then invoke an external linker. Transitive rust depencenies
# are not resolved in either step.
+ "$rust_build:arrayvec",
+ "$rust_build:byteorder",
+ "$rust_build:bytes",
+ "$rust_build:crossbeam_deque",
+ "$rust_build:crossbeam_epoch",
+ "$rust_build:crossbeam_utils",
+ "$rust_build:futures",
"$rust_build:idna",
+ "$rust_build:iovec",
+ "$rust_build:lazy_static",
+ "$rust_build:lazycell",
+ "$rust_build:memoffset",
+ "$rust_build:mio",
+ "$rust_build:net2",
+ "$rust_build:nodrop",
+ "$rust_build:num_cpus",
"$rust_build:percent_encoding",
- "$rust_build:unicode_bidi",
- "$rust_build:unicode_normalization",
"$rust_build:rand",
"$rust_build:rand_core",
"$rust_build:remove_dir_all",
+ "$rust_build:scopeguard",
+ "$rust_build:slab",
+ "$rust_build:tokio_executor",
+ "$rust_build:tokio_fs",
+ "$rust_build:tokio_io",
+ "$rust_build:tokio_reactor",
+ "$rust_build:tokio_tcp",
+ "$rust_build:tokio_threadpool",
+ "$rust_build:tokio_current_thread",
+ "$rust_build:tokio_timer",
+ "$rust_build:tokio_udp",
+ "$rust_build:unicode_bidi",
+ "$rust_build:unicode_normalization",
"$rust_build:winapi",
]
diff --git a/Cargo.toml b/Cargo.toml
index f00f5d344..ea3efec29 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,3 +13,4 @@ libc = "0.2.42"
log = "0.4.3"
sha1 = "0.6.0"
tempfile = "3"
+tokio = {git = "https://github.com/tokio-rs/tokio.git", rev = "5d0d2a2e1214f856993df6965825c89bfcaa879e"}
diff --git a/build_extra/rust/BUILD.gn b/build_extra/rust/BUILD.gn
index 747ee8ba6..81613673b 100644
--- a/build_extra/rust/BUILD.gn
+++ b/build_extra/rust/BUILD.gn
@@ -37,7 +37,7 @@ rust_component("percent_encoding") {
}
rust_component("matches") {
- source_root = "$registry_github/matches-0.1.6/lib.rs"
+ source_root = "$registry_github/matches-0.1.7/lib.rs"
}
rust_component("idna") {
@@ -145,3 +145,228 @@ rust_component("winapi") {
"winreg",
]
}
+
+rust_component("futures") {
+ source_root = "$registry_github/futures-0.1.23/src/lib.rs"
+ cfg = [
+ "feature=\"use_std\"",
+ "feature=\"with-deprecated\"",
+ ]
+}
+
+rust_component("mio") {
+ source_root = "$registry_github/mio-0.6.15/src/lib.rs"
+ extern = [
+ ":iovec",
+ ":lazycell",
+ ":log",
+ ":net2",
+ ":slab",
+ ":libc",
+ ]
+ cfg = [ "feature=\"with-deprecated\"" ]
+}
+
+rust_component("iovec") {
+ source_root = "$registry_github/iovec-0.1.2/src/lib.rs"
+ extern = [ ":libc" ]
+}
+
+rust_component("lazycell") {
+ source_root = "$registry_github/lazycell-0.6.0/src/lib.rs"
+}
+
+rust_component("net2") {
+ source_root = "$registry_github/net2-0.2.33/src/lib.rs"
+ extern = [
+ ":cfg_if",
+ ":libc",
+ ]
+}
+
+rust_component("slab") {
+ source_root = "$registry_github/slab-0.4.0/src/lib.rs"
+}
+
+rust_component("bytes") {
+ source_root = "$registry_github/bytes-0.4.9/src/lib.rs"
+ extern = [
+ ":byteorder",
+ ":iovec",
+ ]
+}
+
+rust_component("byteorder") {
+ source_root = "$registry_github/byteorder-1.2.4/src/lib.rs"
+}
+
+rust_component("crossbeam_deque") {
+ source_root = "$registry_github/crossbeam-deque-0.5.1/src/lib.rs"
+ extern = [
+ ":crossbeam_epoch",
+ ":crossbeam_utils",
+ ]
+}
+
+rust_component("crossbeam_epoch") {
+ source_root = "$registry_github/crossbeam-epoch-0.5.1/src/lib.rs"
+ extern = [
+ ":arrayvec",
+ ":cfg_if",
+ ":crossbeam_utils",
+ ":lazy_static",
+ ":memoffset",
+ ":scopeguard",
+ ]
+ cfg = [ "feature=\"use_std\"" ]
+}
+
+rust_component("crossbeam_utils") {
+ source_root = "$registry_github/crossbeam-utils-0.4.1/src/lib.rs"
+ extern = [ ":cfg_if" ]
+ cfg = [ "feature=\"use_std\"" ]
+}
+
+rust_component("arrayvec") {
+ source_root = "$registry_github/arrayvec-0.4.7/src/lib.rs"
+ extern = [ ":nodrop" ]
+}
+
+rust_component("nodrop") {
+ source_root = "$registry_github/nodrop-0.1.12/src/lib.rs"
+}
+
+rust_component("lazy_static") {
+ source_root = "$registry_github/lazy_static-1.0.2/src/lib.rs"
+}
+
+rust_component("memoffset") {
+ source_root = "$registry_github/memoffset-0.2.1/src/lib.rs"
+}
+
+rust_component("scopeguard") {
+ source_root = "$registry_github/scopeguard-0.3.3/src/lib.rs"
+ cfg = [ "feature=\"use_std\"" ]
+}
+
+rust_component("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_component("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_component("tokio_executor") {
+ source_root = "$tokio_root/tokio-executor/src/lib.rs"
+ extern = [ ":futures" ]
+}
+
+rust_component("tokio_current_thread") {
+ source_root = "$tokio_root/tokio-current-thread/src/lib.rs"
+ extern = [
+ ":tokio_executor",
+ ":futures",
+ ]
+}
+
+rust_component("tokio_fs") {
+ source_root = "$tokio_root//tokio-fs/src/lib.rs"
+ extern = [
+ ":futures",
+ ":tokio_io",
+ ":tokio_threadpool",
+ ]
+}
+
+rust_component("tokio_io") {
+ source_root = "$tokio_root/tokio-io/src/lib.rs"
+ extern = [
+ ":bytes",
+ ":futures",
+ ":log",
+ ]
+}
+
+rust_component("tokio_timer") {
+ source_root = "$tokio_root/tokio-timer/src/lib.rs"
+ extern = [
+ ":futures",
+ ":tokio_executor",
+ ]
+}
+
+rust_component("tokio_udp") {
+ source_root = "$tokio_root/tokio-udp/src/lib.rs"
+ extern = [
+ ":bytes",
+ ":futures",
+ ":log",
+ ":mio",
+ ":tokio_codec",
+ ":tokio_io",
+ ":tokio_reactor",
+ ]
+}
+
+rust_component("tokio_codec") {
+ source_root = "$tokio_root/tokio-codec/src/lib.rs"
+ extern = [
+ ":bytes",
+ ":futures",
+ ":tokio_io",
+ ]
+}
+
+rust_component("tokio_reactor") {
+ source_root = "$tokio_root/tokio-reactor/src/lib.rs"
+ extern = [
+ ":futures",
+ ":log",
+ ":mio",
+ ":slab",
+ ":tokio_executor",
+ ":tokio_io",
+ ]
+}
+
+rust_component("tokio_tcp") {
+ source_root = "$tokio_root/tokio-tcp/src/lib.rs"
+ extern = [
+ ":bytes",
+ ":futures",
+ ":iovec",
+ ":mio",
+ ":tokio_io",
+ ":tokio_reactor",
+ ]
+}
+
+rust_component("tokio_threadpool") {
+ source_root = "$tokio_root/tokio-threadpool/src/lib.rs"
+ extern = [
+ ":crossbeam_deque",
+ ":crossbeam_utils",
+ ":futures",
+ ":log",
+ ":num_cpus",
+ ":rand",
+ ":tokio_executor",
+ ]
+}
diff --git a/third_party b/third_party
-Subproject 7c92614e983770491d998883c6e6a9e62645794
+Subproject 5e912f7b808e3bb1cef7310d0412fdcb79b08fe