Skip to content

Commit febe5e6

Browse files
committed
feat(dfir_rs,hydro_lang): add experimental io-uring based networking
1 parent f783e67 commit febe5e6

File tree

12 files changed

+372
-66
lines changed

12 files changed

+372
-66
lines changed

.github/workflows/ci.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ jobs:
165165
DFIR_EXPECT_WARNINGS: ${{ matrix.rust_release == 'pinned-nightly' && 'noop' || 'ignore' }}
166166

167167
- name: Run doctests
168+
# Not supported by nextest: https://github.com/nextest-rs/nextest/issues/16
168169
run: cargo test --no-fail-fast --features python --features hydro_lang/deploy --doc
169170

170171
- name: Install Python
@@ -197,7 +198,7 @@ jobs:
197198
source .venv/bin/activate
198199
cd python_tests
199200
pip install -r requirements.txt
200-
RUST_BACKTRACE=1 pytest
201+
pytest
201202
202203
- name: Run Python tests (Windows)
203204
if: ${{ matrix.os == 'windows-latest' }}
@@ -277,7 +278,7 @@ jobs:
277278

278279
- env:
279280
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
280-
run: cargo doc --no-deps --all-features
281+
run: cargo doc --no-deps --all-features --workspace --exclude hydro_cli
281282

282283
- name: Move design docs to output
283284
shell: bash

Cargo.lock

+42-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_docs.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUSTFLAGS="--cfg procmacro2_semver_exempt --cfg super_unstable" CC="$PWD/../LLVM
1515

1616
cd ..
1717

18-
RUSTDOCFLAGS="--cfg docsrs -Dwarnings" cargo doc --no-deps --all-features
18+
RUSTDOCFLAGS="--cfg docsrs -Dwarnings" cargo doc --no-deps --all-features --workspace --exclude hydro_cli
1919

2020
cp -r target/doc docs/static/rustdoc
2121

dfir_rs/Cargo.toml

+39-23
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ license = { workspace = true }
1212
workspace = true
1313

1414
[features]
15-
default = [ "macros", "debugging", "meta" ]
15+
default = ["macros", "debugging", "meta"]
1616

17-
meta = [ "dep:dfir_lang" ]
18-
macros = [ "dfir_macro", "dfir_datalog" ]
19-
dfir_macro = [ "dep:dfir_macro" ]
20-
dfir_datalog = [ "dep:dfir_datalog" ]
21-
deploy_integration = [ "dep:hydro_deploy_integration" ]
22-
python = [ "dep:pyo3" ]
23-
debugging = [ "dfir_lang/debugging" ]
17+
meta = ["dep:dfir_lang"]
18+
macros = ["dfir_macro", "dfir_datalog"]
19+
dfir_macro = ["dep:dfir_macro"]
20+
dfir_datalog = ["dep:dfir_datalog"]
21+
deploy_integration = ["dep:hydro_deploy_integration"]
22+
python = ["dep:pyo3"]
23+
debugging = ["dfir_lang/debugging"]
24+
io-uring = ["hydro_deploy_integration/io-uring"]
2425

2526
[package.metadata.docs.rs]
2627
all-features = true
@@ -30,7 +31,7 @@ name = "kvs_bench"
3031

3132
[[example]]
3233
name = "python_udf"
33-
required-features = [ "python" ]
34+
required-features = ["python"]
3435

3536
[dependencies]
3637
bincode = "1.3.1"
@@ -42,18 +43,22 @@ dfir_macro = { optional = true, path = "../dfir_macro", version = "^0.12.1" }
4243
futures = "0.3.0"
4344
hydro_deploy_integration = { optional = true, path = "../hydro_deploy/hydro_deploy_integration", version = "^0.12.1" }
4445
itertools = "0.13.0"
45-
lattices = { path = "../lattices", version = "^0.6.1", features = [ "serde" ] }
46+
lattices = { path = "../lattices", version = "^0.6.1", features = ["serde"] }
4647
pusherator = { path = "../pusherator", version = "^0.0.12" }
4748
pyo3 = { optional = true, version = "0.20" }
4849
ref-cast = "1.0.0"
4950
regex = "1.10.4"
5051
rustc-hash = "1.1.0"
5152
sealed = "0.5.0"
52-
serde = { version = "1.0.197", features = [ "derive" ] }
53+
serde = { version = "1.0.197", features = ["derive"] }
5354
serde_json = "1.0.115"
5455
slotmap = "1.0.0"
5556
smallvec = "1.6.1"
56-
tokio-stream = { version = "0.1.3", default-features = false, features = [ "time", "io-util", "sync" ] }
57+
tokio-stream = { version = "0.1.3", default-features = false, features = [
58+
"time",
59+
"io-util",
60+
"sync",
61+
] }
5762
tracing = "0.1.37"
5863
variadics = { path = "../variadics", version = "^0.0.9" }
5964
web-time = "1.0.0"
@@ -63,38 +68,49 @@ multiplatform_test = { path = "../multiplatform_test", version = "^0.5.0", optio
6368
include_mdtests = { path = "../include_mdtests", version = "^0.0.0", optional = true }
6469

6570
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
66-
tokio = { version = "1.29.0", features = [ "full" ] }
67-
tokio-util = { version = "0.7.5", features = [ "net", "codec" ] }
71+
tokio = { version = "1.29.0", features = ["full"] }
72+
tokio-util = { version = "0.7.5", features = ["net", "codec"] }
6873

6974
[target.'cfg(target_arch = "wasm32")'.dependencies]
70-
tokio = { version = "1.29.0", features = [ "rt" , "sync", "macros", "io-util", "time" ] }
71-
tokio-util = { version = "0.7.5", features = [ "codec" ] }
75+
tokio = { version = "1.29.0", features = [
76+
"rt",
77+
"sync",
78+
"macros",
79+
"io-util",
80+
"time",
81+
] }
82+
tokio-util = { version = "0.7.5", features = ["codec"] }
7283
# We depend on getrandom transitively through rand. To compile getrandom to
7384
# WASM, we need to enable its "js" feature. However, rand does not expose a
7485
# passthrough to enable "js" on getrandom. As a workaround, we enable the
7586
# getrandom js feature here; when the feature resolver computes the set of
7687
# features for getrandom (unification), it will include "js".
77-
getrandom = { version = "0.2.6", features = [ "js" ] }
88+
getrandom = { version = "0.2.6", features = ["js"] }
7889

7990
[dev-dependencies]
80-
dfir_lang = { path = "../dfir_lang", version = "^0.12.1", features = [ "clap-derive" ] }
91+
dfir_lang = { path = "../dfir_lang", version = "^0.12.1", features = [
92+
"clap-derive",
93+
] }
8194

82-
chrono = { version = "0.4.20", features = [ "serde", "clock" ], default-features = false }
83-
clap = { version = "4.5.4", features = [ "derive" ] }
95+
chrono = { version = "0.4.20", features = [
96+
"serde",
97+
"clock",
98+
], default-features = false }
99+
clap = { version = "4.5.4", features = ["derive"] }
84100
colored = "2.0"
85101
include_mdtests = { path = "../include_mdtests", version = "^0.0.0" }
86102
insta = "1.39"
87103
multiplatform_test = { path = "../multiplatform_test", version = "^0.5.0" }
88-
rand = { version = "0.8.0", features = [ "small_rng" ] }
104+
rand = { version = "0.8.0", features = ["small_rng"] }
89105
rand_distr = "0.4.3"
90106
regex = "1.10.4"
91107
static_assertions = "1.0.0"
92108
time = "0.3"
93-
tracing-subscriber = { version = "0.3", features = [ "env-filter" ] }
109+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
94110
trybuild = "1"
95111
wasm-bindgen-test = "0.3.33"
96112
zipf = "7"
97113

98114
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
99115
# Rayon (rust data-parallelism library) does not compile on WASM.
100-
criterion = { version = "0.5.0", features = [ "async_tokio", "html_reports" ] }
116+
criterion = { version = "0.5.0", features = ["async_tokio", "html_reports"] }

hydro_deploy/hydro_deploy_integration/Cargo.toml

+12-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ edition = { workspace = true }
88
repository = { workspace = true }
99
license = { workspace = true }
1010

11+
[features]
12+
default = []
13+
io-uring = ["dep:tokio-uring", "dep:libc"]
14+
1115
[lints]
1216
workspace = true
1317

@@ -17,13 +21,17 @@ async-trait = "0.1.54"
1721
bytes = "1.1.0"
1822
futures = "0.3.0"
1923
pin-project = "1.0.0"
20-
serde = { version = "1.0.197", features = [ "derive" ] }
24+
serde = { version = "1.0.197", features = ["derive"] }
2125
tempfile = "3.0.0"
2226

2327
# [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
24-
tokio = { version = "1.29.0", features = [ "full" ] }
25-
tokio-util = { version = "0.7.5", features = [ "net", "codec" ] }
26-
tokio-stream = { version = "0.1.3", default-features = false, features = [ "net" ] }
28+
tokio = { version = "1.29.0", features = ["full"] }
29+
tokio-util = { version = "0.7.5", features = ["net", "codec"] }
30+
tokio-stream = { version = "0.1.3", default-features = false, features = [
31+
"net",
32+
] }
33+
tokio-uring = { version = "0.5.0", features = ["bytes"], optional = true }
34+
libc = { version = "0.2.77", optional = true }
2735

2836
# [target.'cfg(target_arch = "wasm32")'.dependencies]
2937
# tokio = { version = "1.29.0", features = [ "rt" , "sync", "macros", "io-util", "time" ] }

0 commit comments

Comments
 (0)