Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ serde = { version = "1", features = ["derive"] }
tokio = "1.48"
web-async = { version = "0.1.4", features = ["tracing"] }
web-transport-iroh = "0.6"
web-transport-noq = "0.2.0"
# default-features off so the QUIC crypto provider is chosen by moq-native's
# aws-lc-rs / ring features (mirroring how the quinn dependency is wired).
web-transport-noq = { version = "0.2.0", default-features = false }
web-transport-proto = "0.6"
web-transport-quiche = "0.4"
web-transport-quinn = "0.11"
Expand Down
2 changes: 1 addition & 1 deletion doc/lib/rs/crate/moq-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ QUIC and WebTransport connection helpers for native Rust applications. Provides
`moq-native` bridges the gap between the transport-agnostic `moq-net` crate and actual QUIC/WebTransport networking. It handles:

- TLS certificate loading and configuration
- QUIC connection setup via [quinn](https://crates.io/crates/quinn)
- QUIC connection setup via a pluggable backend, defaulting to [noq](https://crates.io/crates/noq) (enable the `quinn` feature for [quinn](https://crates.io/crates/quinn) instead)
- WebTransport session management
- Development certificate generation for local testing

Expand Down
2 changes: 1 addition & 1 deletion doc/lib/rs/env/native.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This guide covers connecting to a relay, discovering broadcasts, subscribing to

The key crates:

- [moq-native](https://crates.io/crates/moq-native) — Configures QUIC (via [quinn](https://crates.io/crates/quinn)) and TLS (via [rustls](https://crates.io/crates/rustls)) for you.
- [moq-native](https://crates.io/crates/moq-native) — Configures QUIC (via [noq](https://crates.io/crates/noq) by default, or [quinn](https://crates.io/crates/quinn) with the `quinn` feature) and TLS (via [rustls](https://crates.io/crates/rustls)) for you.
- [moq-net](https://crates.io/crates/moq-net) — The core networking layer. Can be used directly with any `web_transport_trait::Session` implementation if you need full control over the QUIC endpoint.
- [hang](https://crates.io/crates/hang) — Media-specific catalog and container format on top of `moq-net`.

Expand Down
3 changes: 2 additions & 1 deletion rs/moq-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ path = "src/main.rs"
doc = false

[features]
default = ["quinn", "websocket"]
default = ["noq", "websocket"]
iroh = ["moq-native/iroh"]
noq = ["moq-native/noq"]
quinn = ["moq-native/quinn"]
quiche = ["moq-native/quiche"]
websocket = ["moq-native/websocket"]
Expand Down
3 changes: 2 additions & 1 deletion rs/moq-boy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ edition = "2024"
rust-version.workspace = true

[features]
default = ["quinn", "websocket"]
default = ["noq", "websocket"]
jemalloc = ["moq-native/jemalloc"]
noq = ["moq-native/noq"]
quinn = ["moq-native/quinn"]
websocket = ["moq-native/websocket"]

Expand Down
3 changes: 2 additions & 1 deletion rs/moq-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ keywords = ["quic", "http3", "webtransport", "media", "live"]
categories = ["multimedia", "network-programming", "web-programming"]

[features]
default = ["iroh", "quinn", "websocket", "nvenc", "vaapi"]
default = ["iroh", "noq", "websocket", "nvenc", "vaapi"]
iroh = ["moq-native/iroh"]
noq = ["moq-native/noq"]
quinn = ["moq-native/quinn"]
quiche = ["moq-native/quiche"]
websocket = ["moq-native/websocket"]
Expand Down
1 change: 1 addition & 0 deletions rs/moq-gst/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
.from_env_lossy() // Allow overriding with RUST_LOG
.add_directive("h2=warn".parse().unwrap())
.add_directive("quinn=info".parse().unwrap())
.add_directive("noq=info".parse().unwrap())
.add_directive("tracing::span=off".parse().unwrap())
.add_directive("tracing::span::active=off".parse().unwrap());

Expand Down
3 changes: 2 additions & 1 deletion rs/moq-hls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ doc = false
required-features = ["server"]

[features]
default = ["server", "iroh", "quinn", "websocket"]
default = ["server", "iroh", "noq", "websocket"]
# HTTP export server + the moq-hls binary. Pulls in axum / moq-native / clap.
server = ["dep:axum", "dep:axum-server", "dep:clap", "dep:humantime", "dep:moq-native", "dep:rustls", "dep:sd-notify", "dep:tower-http"]
iroh = ["server", "moq-native/iroh"]
noq = ["server", "moq-native/noq"]
quinn = ["server", "moq-native/quinn"]
quiche = ["server", "moq-native/quiche"]
websocket = ["server", "moq-native/websocket"]
Expand Down
8 changes: 5 additions & 3 deletions rs/moq-native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ categories = ["multimedia", "network-programming", "web-programming"]
doctest = false

[features]
default = ["quinn", "aws-lc-rs", "websocket", "tcp", "uds"]
default = ["noq", "aws-lc-rs", "websocket", "tcp", "uds"]
quinn = ["dep:quinn", "dep:web-transport-quinn", "dep:rcgen", "dep:reqwest", "dep:rustls-webpki", "watch"]
noq = ["dep:web-transport-noq", "dep:rcgen", "dep:reqwest", "dep:rustls-webpki", "watch"]
quiche = ["dep:web-transport-quiche", "dep:rcgen"]
# Filesystem watcher for hot-reloading on-disk TLS certs/keys; the QUIC backends imply it.
watch = ["dep:notify"]
aws-lc-rs = ["rustls/aws-lc-rs", "rcgen?/aws_lc_rs", "quinn?/rustls-aws-lc-rs"]
# The QUIC backends pull in their crypto provider from these features (default-features
# are off on each backend dep), so a backend without aws-lc-rs/ring has no initial cipher.
aws-lc-rs = ["rustls/aws-lc-rs", "rcgen?/aws_lc_rs", "quinn?/rustls-aws-lc-rs", "web-transport-noq?/aws-lc-rs"]
iroh = ["dep:web-transport-iroh", "dep:web-transport-proto"]
jemalloc = ["dep:tikv-jemallocator", "dep:tikv-jemalloc-ctl"]
websocket = ["dep:qmux"]
Expand All @@ -31,7 +33,7 @@ tcp = ["dep:qmux"]
# Unix-domain-socket qmux transport (`unix://`), unix-only. Adds peer-credential
# inspection on accept. Pulls in `tcp` (shares qmux's stream transport).
uds = ["tcp", "qmux/uds"]
ring = ["rustls/ring", "rcgen?/ring", "quinn?/rustls-ring"]
ring = ["rustls/ring", "rcgen?/ring", "quinn?/rustls-ring", "web-transport-noq?/ring"]
android-logcat = ["dep:tracing-android"]

[dependencies]
Expand Down
12 changes: 6 additions & 6 deletions rs/moq-native/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,19 @@ impl Client {
pub fn new(config: ClientConfig) -> crate::Result<Self> {
#[cfg(any(feature = "noq", feature = "quinn", feature = "quiche"))]
let backend = config.backend.clone().unwrap_or({
#[cfg(feature = "quinn")]
#[cfg(feature = "noq")]
{
QuicBackend::Quinn
QuicBackend::Noq
}
#[cfg(all(feature = "noq", not(feature = "quinn")))]
#[cfg(all(feature = "quinn", not(feature = "noq")))]
{
QuicBackend::Noq
QuicBackend::Quinn
}
#[cfg(all(feature = "quiche", not(feature = "quinn"), not(feature = "noq")))]
#[cfg(all(feature = "quiche", not(feature = "noq"), not(feature = "quinn")))]
{
QuicBackend::Quiche
}
#[cfg(all(not(feature = "quiche"), not(feature = "quinn"), not(feature = "noq")))]
#[cfg(all(not(feature = "quiche"), not(feature = "noq"), not(feature = "quinn")))]
panic!("no QUIC backend compiled; enable noq, quinn, or quiche feature");
});

Expand Down
1 change: 1 addition & 0 deletions rs/moq-native/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ impl Log {
.from_env_lossy() // Allow overriding with RUST_LOG
.add_directive("h2=warn".parse()?)
.add_directive("quinn=info".parse()?)
.add_directive("noq=info".parse()?)
.add_directive("tungstenite=info".parse()?)
.add_directive("rustls=info".parse()?)
.add_directive("tracing::span=off".parse()?)
Expand Down
12 changes: 6 additions & 6 deletions rs/moq-native/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ pub struct Server {
impl Server {
pub fn new(config: ServerConfig) -> crate::Result<Self> {
let backend = config.backend.clone().unwrap_or({
#[cfg(feature = "quinn")]
#[cfg(feature = "noq")]
{
QuicBackend::Quinn
QuicBackend::Noq
}
#[cfg(all(feature = "noq", not(feature = "quinn")))]
#[cfg(all(feature = "quinn", not(feature = "noq")))]
{
QuicBackend::Noq
QuicBackend::Quinn
}
#[cfg(all(feature = "quiche", not(feature = "quinn"), not(feature = "noq")))]
#[cfg(all(feature = "quiche", not(feature = "noq"), not(feature = "quinn")))]
{
QuicBackend::Quiche
}
#[cfg(all(not(feature = "quiche"), not(feature = "quinn"), not(feature = "noq")))]
#[cfg(all(not(feature = "quiche"), not(feature = "noq"), not(feature = "quinn")))]
panic!("no QUIC backend compiled; enable noq, quinn, or quiche feature");
});

Expand Down
2 changes: 1 addition & 1 deletion rs/moq-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ path = "src/main.rs"
doc = false

[features]
default = ["iroh", "quinn", "websocket", "uds"]
default = ["iroh", "noq", "websocket", "uds"]
iroh = ["moq-native/iroh"]
jemalloc = ["moq-native/jemalloc"]
noq = ["moq-native/noq"]
Expand Down
3 changes: 2 additions & 1 deletion rs/moq-rtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ doc = false
required-features = ["server"]

[features]
default = ["server", "iroh", "quinn", "websocket"]
default = ["server", "iroh", "noq", "websocket"]
# Standalone binary: TLS-terminating listener, CORS, CLI parsing, and the
# moq-native relay client. Pulls in axum-server / clap / moq-native / rustls /
# sd-notify / tower-http.
server = ["dep:axum-server", "dep:clap", "dep:moq-native", "dep:rustls", "dep:sd-notify", "dep:tower-http"]
iroh = ["server", "moq-native/iroh"]
noq = ["server", "moq-native/noq"]
quinn = ["server", "moq-native/quinn"]
quiche = ["server", "moq-native/quiche"]
websocket = ["server", "moq-native/websocket"]
Expand Down
3 changes: 2 additions & 1 deletion rs/moq-rtmp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ doc = false
required-features = ["server"]

[features]
default = ["server", "quinn", "websocket"]
default = ["server", "noq", "websocket"]
# Relay client/server transports + the moq-rtmp binary. Pulls in moq-native /
# axum / clap / rustls.
server = ["dep:axum", "dep:axum-server", "dep:clap", "dep:moq-native", "dep:rustls", "dep:sd-notify", "dep:tokio-rustls", "dep:tower-http", "dep:url"]
noq = ["server", "moq-native/noq"]
quinn = ["server", "moq-native/quinn"]
quiche = ["server", "moq-native/quiche"]
websocket = ["server", "moq-native/websocket"]
Expand Down
3 changes: 2 additions & 1 deletion rs/moq-srt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ doc = false
required-features = ["server"]

[features]
default = ["server", "quinn", "websocket"]
default = ["server", "noq", "websocket"]
# Relay client/server transports + the moq-srt binary. Pulls in moq-native /
# axum / clap / rustls.
server = ["dep:axum", "dep:axum-server", "dep:clap", "dep:humantime", "dep:moq-native", "dep:rustls", "dep:sd-notify", "dep:tower-http", "dep:url"]
noq = ["server", "moq-native/noq"]
quinn = ["server", "moq-native/quinn"]
quiche = ["server", "moq-native/quiche"]
websocket = ["server", "moq-native/websocket"]
Expand Down