Skip to content

Commit

Permalink
Add PoC/example pure uring based UDP client and server
Browse files Browse the repository at this point in the history
These are not fully featured and are basically the bare minimum to get a
working pair of UDP client and server.

By building a pure I/O based event loop the hope was to cut out all the
overhead relating to the use of async and make it possible to focus purely on
the I/O bottlenecks.
  • Loading branch information
xv-ian-c committed Sep 26, 2024
1 parent cbd1014 commit eb21339
Show file tree
Hide file tree
Showing 7 changed files with 1,261 additions and 1 deletion.
48 changes: 48 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ members = [
"lightway-app-utils",
"lightway-client",
"lightway-server",
"uring-udp-server",
"uring-udp-client",
]

resolver = "2"
Expand All @@ -14,10 +16,15 @@ resolver = "2"
lto = true
debug = 1

[profile.custom]
inherits = "release"
lto = false

[workspace.lints.rust]
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_unsafe = "deny"
unused_extern_crates = "deny"

[workspace.lints.clippy]
missing_safety_doc = "deny"
Expand Down
3 changes: 2 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ source:
FROM +install-build-dependencies
COPY --keep-ts Cargo.toml Cargo.lock ./
COPY --keep-ts deny.toml ./
COPY --keep-ts --dir lightway-core lightway-app-utils lightway-client lightway-server .cargo ./
COPY --keep-ts --dir lightway-core lightway-app-utils lightway-client lightway-server uring-udp-client uring-udp-server .cargo ./
COPY --keep-ts --dir tests/certs ./tests/certs/

# build builds with the Cargo release profile
build:
Expand Down
22 changes: 22 additions & 0 deletions uring-udp-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "uring-udp-client"
version = "0.1.0"
edition = "2021"

[dependencies]
lightway-core = { workspace = true, features = ["postquantum"] }
io-uring = "0.6"
anyhow.workspace = true
libc.workspace = true
bytes.workspace = true
tracing-subscriber.workspace = true
tracing.workspace = true
arrayvec = "0.7.6"
tun2 = "3.1.4"
pnet.workspace = true
socket2.workspace = true
sync-unsafe-cell = "0.1.1"

[lints]
workspace = true

Loading

0 comments on commit eb21339

Please sign in to comment.