diff --git a/Cargo.lock b/Cargo.lock index 50ce3a86a4b..3dff76a7c90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10457,6 +10457,7 @@ dependencies = [ "toml_parser", "tower", "tower-http 0.6.11", + "tracing", "tracing-core", "tracing-subscriber", "tungstenite", diff --git a/cpp/obs/src/moq-settings.cpp b/cpp/obs/src/moq-settings.cpp index 3528bfebc81..1d49245e934 100644 --- a/cpp/obs/src/moq-settings.cpp +++ b/cpp/obs/src/moq-settings.cpp @@ -350,9 +350,9 @@ std::string Configure(obs_data_t *settings, moq::ClientConfig &config) // transport free to pick. if (const char *family = OptionalString(settings, QUIC_CONGESTION_CONTROL)) { if (strcmp(family, "delay") == 0) - config.quic.congestion_control = moq::CongestionControl::kDelay; + config.quic.congestion_control = moq::CongestionControl::delay(); else if (strcmp(family, "loss") == 0) - config.quic.congestion_control = moq::CongestionControl::kLoss; + config.quic.congestion_control = moq::CongestionControl::loss(); else Refuse(error, std::string("unknown congestion control: ") + family); } diff --git a/cpp/obs/test/moq-settings-test.cpp b/cpp/obs/test/moq-settings-test.cpp index 759160b8aca..47e564c71ed 100644 --- a/cpp/obs/test/moq-settings-test.cpp +++ b/cpp/obs/test/moq-settings-test.cpp @@ -191,7 +191,8 @@ int main() CHECK(config.timeout == std::chrono::milliseconds(7000)); CHECK(config.race == std::chrono::milliseconds(80)); CHECK(config.tls.host_name == std::string("relay.example")); - CHECK(config.quic.congestion_control == moq::CongestionControl::kLoss); + CHECK(config.quic.congestion_control); + CHECK(config.quic.congestion_control->eq(moq::CongestionControl::loss())); CHECK(config.quic.idle_timeout == std::chrono::milliseconds(9000)); CHECK(config.quic.keep_alive == std::chrono::nanoseconds::zero()); CHECK(config.quic.gso == false); diff --git a/dart/moq/lib/src/aliases.dart b/dart/moq/lib/src/aliases.dart index f012ffbb44b..f3a8b4deda7 100644 --- a/dart/moq/lib/src/aliases.dart +++ b/dart/moq/lib/src/aliases.dart @@ -38,7 +38,9 @@ typedef Request = MoqRequest; /// The network transport carrying an incoming session. typedef Transport = MoqTransport; -/// The congestion control family for a QUIC connection. +/// The congestion control family for a QUIC connection. Build one with +/// `CongestionControl.delay()`, `.loss()`, or `.none()`; a new algorithm joins as +/// a new constructor. typedef CongestionControl = MoqCongestionControl; /// Certificate trust and the mTLS identity for `ConnectOptions.tls`. diff --git a/dart/moq/test/moq_test.dart b/dart/moq/test/moq_test.dart index 904a0b3b159..ca38716c679 100644 --- a/dart/moq/test/moq_test.dart +++ b/dart/moq/test/moq_test.dart @@ -522,7 +522,7 @@ void main() { keepAlive: Duration.zero, gso: false, mtuDiscovery: true, - congestionControl: CongestionControl.loss, + congestionControl: CongestionControl.loss(), keylog: false, ), once: true, diff --git a/dart/moq_ffi/lib/src/moq.dart b/dart/moq_ffi/lib/src/moq.dart index 08745de3811..dfb1286bdfd 100644 --- a/dart/moq_ffi/lib/src/moq.dart +++ b/dart/moq_ffi/lib/src/moq.dart @@ -8751,44 +8751,6 @@ class FfiConverterMoqTransport { } } -enum MoqCongestionControl { loss, delay, none } - -class FfiConverterMoqCongestionControl { - static LiftRetVal read(Uint8List buf) { - final index = buf.buffer.asByteData(buf.offsetInBytes).getInt32(0); - switch (index) { - case 1: - return LiftRetVal(MoqCongestionControl.loss, 4); - case 2: - return LiftRetVal(MoqCongestionControl.delay, 4); - case 3: - return LiftRetVal(MoqCongestionControl.none, 4); - default: - throw UniffiInternalError( - UniffiInternalError.unexpectedEnumCase, - "Unable to determine enum variant", - ); - } - } - - static MoqCongestionControl lift(RustBuffer buffer) { - return FfiConverterMoqCongestionControl.read(buffer.asUint8List()).value; - } - - static RustBuffer lower(MoqCongestionControl input) { - return toRustBuffer(createUint8ListFromInt(input.index + 1)); - } - - static int allocationSize(MoqCongestionControl _value) { - return 4; - } - - static int write(MoqCongestionControl value, Uint8List buf) { - buf.buffer.asByteData(buf.offsetInBytes).setInt32(0, value.index + 1); - return 4; - } -} - abstract class MoqConnectionPhase { RustBuffer lower(); int allocationSize(); @@ -15950,6 +15912,143 @@ class FfiConverterMoqClient { } } +abstract class MoqCongestionControlInterface {} + +final _MoqCongestionControlFinalizer = Finalizer>((ptr) { + rustCall( + (status) => uniffi_moq_ffi_fn_free_moqcongestioncontrol(ptr, status), + ); +}); + +class MoqCongestionControl implements MoqCongestionControlInterface { + late final Pointer _ptr; + bool _isDisposed = false; + MoqCongestionControl._(this._ptr) { + _MoqCongestionControlFinalizer.attach(this, _ptr, detach: this); + } + MoqCongestionControl.delay() + : _ptr = rustCall( + (status) => + uniffi_moq_ffi_fn_constructor_moqcongestioncontrol_delay(status), + null, + ) { + _MoqCongestionControlFinalizer.attach(this, _ptr, detach: this); + } + MoqCongestionControl.loss() + : _ptr = rustCall( + (status) => + uniffi_moq_ffi_fn_constructor_moqcongestioncontrol_loss(status), + null, + ) { + _MoqCongestionControlFinalizer.attach(this, _ptr, detach: this); + } + MoqCongestionControl.none() + : _ptr = rustCall( + (status) => + uniffi_moq_ffi_fn_constructor_moqcongestioncontrol_none(status), + null, + ) { + _MoqCongestionControlFinalizer.attach(this, _ptr, detach: this); + } + factory MoqCongestionControl.lift(Pointer ptr) { + return MoqCongestionControl._(ptr); + } + Pointer uniffiClonePointer() { + if (_isDisposed) { + throw StateError("Object has already been disposed"); + } + return rustCall( + (status) => uniffi_moq_ffi_fn_clone_moqcongestioncontrol(_ptr, status), + ); + } + + void dispose() { + if (_isDisposed) { + return; + } + final status = calloc(); + _isDisposed = true; + _MoqCongestionControlFinalizer.detach(this); + try { + uniffi_moq_ffi_fn_free_moqcongestioncontrol(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } + } + + String debugString() { + return rustCallWithLifter( + (status) => + uniffi_moq_ffi_fn_method_moqcongestioncontrol_uniffi_trait_debug( + uniffiClonePointer(), + status, + ), + FfiConverterString.lift, + null, + ); + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (other is! MoqCongestionControl) { + return false; + } + return rustCallWithLifter( + (status) => + uniffi_moq_ffi_fn_method_moqcongestioncontrol_uniffi_trait_eq_eq( + uniffiClonePointer(), + FfiConverterMoqCongestionControl.lower(other), + status, + ), + FfiConverterBool.lift, + null, + ); + } + + @override + int get hashCode { + return rustCallWithLifter( + (status) => + uniffi_moq_ffi_fn_method_moqcongestioncontrol_uniffi_trait_hash( + uniffiClonePointer(), + status, + ), + FfiConverterUInt64.lift, + null, + ); + } +} + +class FfiConverterMoqCongestionControl { + static MoqCongestionControl lift(Pointer ptr) { + return MoqCongestionControl.lift(ptr); + } + + static Pointer lower(MoqCongestionControl value) { + return value.uniffiClonePointer(); + } + + static int allocationSize(MoqCongestionControl value) { + return 8; + } + + static LiftRetVal read(Uint8List buf) { + final handle = buf.buffer.asByteData(buf.offsetInBytes).getInt64(0); + final pointer = Pointer.fromAddress(handle); + return LiftRetVal(MoqCongestionControl.lift(pointer), 8); + } + + static int write(MoqCongestionControl value, Uint8List buf) { + final handle = lower(value); + buf.buffer.asByteData(buf.offsetInBytes).setInt64(0, handle.address); + return 8; + } +} + abstract class MoqSessionInterface { MoqAllocator allocator(); void cancel({required int code}); @@ -23045,6 +23144,78 @@ external Pointer uniffi_moq_ffi_fn_method_moqclient_connect( RustBuffer url, ); +@Native Function(Pointer, Pointer)>( + assetId: _uniffiAssetId, +) +external Pointer uniffi_moq_ffi_fn_clone_moqcongestioncontrol( + Pointer handle, + Pointer uniffiStatus, +); + +@Native, Pointer)>( + assetId: _uniffiAssetId, +) +external void uniffi_moq_ffi_fn_free_moqcongestioncontrol( + Pointer handle, + Pointer uniffiStatus, +); + +@Native Function(Pointer)>( + assetId: _uniffiAssetId, +) +external Pointer uniffi_moq_ffi_fn_constructor_moqcongestioncontrol_delay( + Pointer uniffiStatus, +); + +@Native Function(Pointer)>( + assetId: _uniffiAssetId, +) +external Pointer uniffi_moq_ffi_fn_constructor_moqcongestioncontrol_loss( + Pointer uniffiStatus, +); + +@Native Function(Pointer)>( + assetId: _uniffiAssetId, +) +external Pointer uniffi_moq_ffi_fn_constructor_moqcongestioncontrol_none( + Pointer uniffiStatus, +); + +@Native, Pointer)>( + assetId: _uniffiAssetId, +) +external RustBuffer +uniffi_moq_ffi_fn_method_moqcongestioncontrol_uniffi_trait_debug( + Pointer ptr, + Pointer uniffiStatus, +); + +@Native, Pointer, Pointer)>( + assetId: _uniffiAssetId, +) +external int uniffi_moq_ffi_fn_method_moqcongestioncontrol_uniffi_trait_eq_eq( + Pointer ptr, + Pointer other, + Pointer uniffiStatus, +); + +@Native, Pointer, Pointer)>( + assetId: _uniffiAssetId, +) +external int uniffi_moq_ffi_fn_method_moqcongestioncontrol_uniffi_trait_eq_ne( + Pointer ptr, + Pointer other, + Pointer uniffiStatus, +); + +@Native, Pointer)>( + assetId: _uniffiAssetId, +) +external int uniffi_moq_ffi_fn_method_moqcongestioncontrol_uniffi_trait_hash( + Pointer ptr, + Pointer uniffiStatus, +); + @Native Function(Pointer, Pointer)>( assetId: _uniffiAssetId, ) @@ -24833,6 +25004,15 @@ external int uniffi_moq_ffi_checksum_constructor_moqserver_new(); @Native(assetId: _uniffiAssetId) external int uniffi_moq_ffi_checksum_constructor_moqclient_new(); +@Native(assetId: _uniffiAssetId) +external int uniffi_moq_ffi_checksum_constructor_moqcongestioncontrol_delay(); + +@Native(assetId: _uniffiAssetId) +external int uniffi_moq_ffi_checksum_constructor_moqcongestioncontrol_loss(); + +@Native(assetId: _uniffiAssetId) +external int uniffi_moq_ffi_checksum_constructor_moqcongestioncontrol_none(); + @Native(assetId: _uniffiAssetId) external int uniffi_moq_ffi_checksum_constructor_moqsocketendpoint_new(); @@ -25753,6 +25933,18 @@ void _checkApiChecksums() { if (uniffi_moq_ffi_checksum_constructor_moqclient_new() != 48355) { throw UniffiInternalError.panicked("UniFFI API checksum mismatch"); } + if (uniffi_moq_ffi_checksum_constructor_moqcongestioncontrol_delay() != + 62385) { + throw UniffiInternalError.panicked("UniFFI API checksum mismatch"); + } + if (uniffi_moq_ffi_checksum_constructor_moqcongestioncontrol_loss() != + 53409) { + throw UniffiInternalError.panicked("UniFFI API checksum mismatch"); + } + if (uniffi_moq_ffi_checksum_constructor_moqcongestioncontrol_none() != + 50250) { + throw UniffiInternalError.panicked("UniFFI API checksum mismatch"); + } if (uniffi_moq_ffi_checksum_constructor_moqsocketendpoint_new() != 25288) { throw UniffiInternalError.panicked("UniFFI API checksum mismatch"); } diff --git a/doc/bin/relay/config.md b/doc/bin/relay/config.md index 8330db7a7c6..bd4d998deb6 100644 --- a/doc/bin/relay/config.md +++ b/doc/bin/relay/config.md @@ -116,7 +116,7 @@ Transport tuning, applied to accepted and dialed connections alike. ```toml [quic] -congestion_control = "delay" # "delay" (BBR, the default), "loss" (CUBIC), or "none". +congestion_control = "delay" # "delay" (BBR v3, the default), "loss" (CUBIC), or "none". max_streams = 10000 # Concurrent streams per connection, bidi and uni; 0 is refused. Default. idle_timeout = "10s" # Drop a connection after this long with nothing on it. Default. # keep_alive = "3s" # Ping interval; unset or "0s" derives it from the idle timeout. diff --git a/go/wrapper/client.go b/go/wrapper/client.go index 9b76bbb1c68..1bb3b43fca5 100644 --- a/go/wrapper/client.go +++ b/go/wrapper/client.go @@ -105,7 +105,7 @@ type QUICConfig struct { GSO *bool // MTUDiscovery toggles path MTU discovery. MTUDiscovery *bool - // CongestionControl picks the congestion control family. + // CongestionControl picks the congestion control family; nil leaves the choice to the backend. CongestionControl *CongestionControl // Qlog is a directory, which must exist, to write qlog traces into. Dial // fails unless QlogSupported. @@ -185,7 +185,7 @@ func (c ClientConfig) ffi() (ffi.MoqClientConfig, error) { KeepAlive: c.QUIC.KeepAlive, Gso: c.QUIC.GSO, MtuDiscovery: c.QUIC.MTUDiscovery, - CongestionControl: c.QUIC.CongestionControl, + CongestionControl: optional(c.QUIC.CongestionControl), Qlog: str(c.QUIC.Qlog), Keylog: keylog, }, diff --git a/go/wrapper/origin.go b/go/wrapper/origin.go index a70b7c559a4..6fdb7d8f3e8 100644 --- a/go/wrapper/origin.go +++ b/go/wrapper/origin.go @@ -57,12 +57,12 @@ func (o RouteOptions) ffi() ffi.MoqRouteOptions { return ffi.MoqRouteOptions{Hidden: o.Hidden, Cost: o.Cost, Instance: optional(o.Instance), Epoch: o.Epoch} } -// optional lowers a nil instance to the ffi's None. -func optional(instance *Instance) **ffi.MoqInstance { - if instance == nil { +// optional lowers a nil ffi object to the ffi's None. +func optional[T any](object *T) **T { + if object == nil { return nil } - return &instance + return &object } // Route creates a route at exactly path, owning a new broadcast to fill. diff --git a/go/wrapper/reconnect_test.go b/go/wrapper/reconnect_test.go index 20e7cc7a18d..1324869bf0d 100644 --- a/go/wrapper/reconnect_test.go +++ b/go/wrapper/reconnect_test.go @@ -328,7 +328,7 @@ func TestDialConnectionOptions(t *testing.T) { KeepAlive: ptr(time.Duration(0)), GSO: ptr(false), MTUDiscovery: ptr(true), - CongestionControl: ptr(moq.CongestionControlLoss), + CongestionControl: moq.LossCongestionControl(), }, WebSocket: moq.WebSocketConfig{Enabled: ptr(false)}, }) diff --git a/go/wrapper/types.go b/go/wrapper/types.go index 4660e3fed5b..154baa0acaf 100644 --- a/go/wrapper/types.go +++ b/go/wrapper/types.go @@ -19,7 +19,9 @@ type ( AudioSampleFormat = ffi.MoqAudioSampleFormat // AudioFrame is one audio frame: PCM payload plus a presentation Timestamp. AudioFrame = ffi.MoqAudioFrame - // CongestionControl is the congestion control family for a QUIC connection. + // CongestionControl is the congestion control family for a QUIC connection. Build one with + // DelayCongestionControl, LossCongestionControl, or NoneCongestionControl; a new algorithm + // joins as a new builder. CongestionControl = ffi.MoqCongestionControl // ErrorScope is whether a protocol code is from the session or stream registry. ErrorScope = ffi.MoqErrorScope @@ -164,15 +166,20 @@ const ( CompressionDeflate = ffi.MoqCompressionDeflate ) -// CongestionControl values. -const ( - // CongestionControlLoss is loss-based (CUBIC): it chases throughput, so the send rate sawtooths. - CongestionControlLoss = ffi.MoqCongestionControlLoss - // CongestionControlDelay is delay-based (BBR): it keeps queues short and the send rate steady. - CongestionControlDelay = ffi.MoqCongestionControlDelay - // CongestionControlNone runs no congestion control and no pacing, for tests and controlled links. - CongestionControlNone = ffi.MoqCongestionControlNone -) +// LossCongestionControl is loss-based (CUBIC): it chases throughput, so the send rate sawtooths. +func LossCongestionControl() *CongestionControl { + return ffi.MoqCongestionControlLoss() +} + +// DelayCongestionControl is delay-based (BBR v3), the default: it keeps queues short and the send rate steady. +func DelayCongestionControl() *CongestionControl { + return ffi.MoqCongestionControlDelay() +} + +// NoneCongestionControl runs no congestion control and no pacing, for tests and controlled links. +func NoneCongestionControl() *CongestionControl { + return ffi.MoqCongestionControlNone() +} // ParseInstance names an instance with text, failing with ErrInvalidInstance when it is empty. func ParseInstance(text string) (*Instance, error) { diff --git a/kt/moq/src/jvmAndAndroidMain/kotlin/dev/moq/Aliases.kt b/kt/moq/src/jvmAndAndroidMain/kotlin/dev/moq/Aliases.kt index 740f510eb8d..d459f78f241 100644 --- a/kt/moq/src/jvmAndAndroidMain/kotlin/dev/moq/Aliases.kt +++ b/kt/moq/src/jvmAndAndroidMain/kotlin/dev/moq/Aliases.kt @@ -40,7 +40,10 @@ typealias ServerTls = uniffi.moq.MoqServerTls /** QUIC transport tuning, such as the peer's inbound stream cap. */ typealias QuicConfig = uniffi.moq.MoqQuicConfig -/** The congestion control family for a QUIC connection. */ +/** + * The congestion control family for a QUIC connection. Build one with `CongestionControl.delay()`, + * `loss()`, or `none()`; a new algorithm joins as a new constructor. + */ typealias CongestionControl = uniffi.moq.MoqCongestionControl /** The WebSocket fallback raced against QUIC: whether it runs and QUIC's head start. */ diff --git a/kt/moq/src/jvmAndAndroidTest/kotlin/dev/moq/SmokeTest.kt b/kt/moq/src/jvmAndAndroidTest/kotlin/dev/moq/SmokeTest.kt index eeddca403a5..f70e82f3888 100644 --- a/kt/moq/src/jvmAndAndroidTest/kotlin/dev/moq/SmokeTest.kt +++ b/kt/moq/src/jvmAndAndroidTest/kotlin/dev/moq/SmokeTest.kt @@ -201,7 +201,7 @@ class SmokeTest { assertNotNull(defaults.timeout) assertNull(defaults.quic.congestionControl) assertTrue(versions().isNotEmpty()) - val congestion: CongestionControl = CongestionControl.DELAY + val congestion: CongestionControl = CongestionControl.delay() assertEquals(congestion, QuicConfig(congestionControl = congestion).congestionControl) // Dialing with the reported defaults is the same as dialing with none. Client(defaults).close() diff --git a/nix/Cargo.nix b/nix/Cargo.nix index b6f54547036..b4015397a1a 100644 --- a/nix/Cargo.nix +++ b/nix/Cargo.nix @@ -18584,6 +18584,7 @@ rec { { name = "tracing"; packageId = "tracing"; + optional = true; } ]; devDependencies = [ @@ -18605,7 +18606,10 @@ rec { packageId = "workspace-hack"; } ]; - + features = { + "lab" = [ "dep:tracing" ]; + }; + resolvedDefaultFeatures = [ "lab" ]; }; "moq-crypto" = rec { crateName = "moq-crypto"; @@ -20184,6 +20188,11 @@ rec { "sim" ]; } + { + name = "moq-congestion"; + packageId = "moq-congestion"; + features = [ "lab" ]; + } { name = "moq-quic"; packageId = "moq-quic"; @@ -21699,6 +21708,7 @@ rec { { name = "moq-congestion"; packageId = "moq-congestion"; + features = [ "lab" ]; } { name = "moq-shaper"; @@ -59667,6 +59677,10 @@ rec { "follow-redirect" ]; } + { + name = "tracing"; + packageId = "tracing"; + } { name = "tracing-core"; packageId = "tracing-core"; @@ -61109,6 +61123,10 @@ rec { "follow-redirect" ]; } + { + name = "tracing"; + packageId = "tracing"; + } { name = "tracing-core"; packageId = "tracing-core"; diff --git a/py/moq-rs/README.md b/py/moq-rs/README.md index 5a577bbc148..30f8706466b 100644 --- a/py/moq-rs/README.md +++ b/py/moq-rs/README.md @@ -141,7 +141,7 @@ client = moq.Client( - `fingerprints`. Hex SHA-256 fingerprint(s) to pin the peer's certificate to, the native equivalent of `serverCertificateHashes`. Accepts the values a server reports via `cert_fingerprints()`, so you can trust a self-signed certificate without `insecure=True`. - `cert`, `key`. Paired PEM certificate chain and private key paths for mTLS. - `host_name`. Verify the certificate against this name (SNI) instead of the URL's host. - - `quic=QuicConfig(...)`. QUIC tuning: `max_streams` raises the peer's inbound stream cap; `idle_timeout`, `keep_alive` (`timedelta(0)` uses the default), `gso`, `mtu_discovery`, `congestion_control` (a `CongestionControl`), and `qlog` (a trace directory when `qlog_supported()`). `keylog=True` writes TLS session secrets to the file `SSLKEYLOGFILE` names, for decrypting a capture; without `SSLKEYLOGFILE` the client refuses to build. + - `quic=QuicConfig(...)`. QUIC tuning: `max_streams` raises the peer's inbound stream cap; `idle_timeout`, `keep_alive` (`timedelta(0)` uses the default), `gso`, `mtu_discovery`, `congestion_control` (a `CongestionControl`, such as `CongestionControl.delay()`), and `qlog` (a trace directory when `qlog_supported()`). `keylog=True` writes TLS session secrets to the file `SSLKEYLOGFILE` names, for decrypting a capture; without `SSLKEYLOGFILE` the client refuses to build. - `websocket=WebSocketConfig(...)`. The fallback raced against QUIC: `enabled=False` turns it off, and `delay` is QUIC's head start. - `once`, `backoff`. Redial with a `Backoff` when the transport drops; `once=True` dials once. - `.session`. The connecting or connected `Session` (or `None` before entering / after exit). diff --git a/py/moq-rs/tests/test_server.py b/py/moq-rs/tests/test_server.py index a347f3dd818..af75f795424 100644 --- a/py/moq-rs/tests/test_server.py +++ b/py/moq-rs/tests/test_server.py @@ -367,7 +367,7 @@ async def accept_loop() -> None: keep_alive=timedelta(0), gso=False, mtu_discovery=True, - congestion_control=moq.CongestionControl.LOSS, + congestion_control=moq.CongestionControl.loss(), keylog=False, ), websocket=moq.WebSocketConfig(enabled=False), diff --git a/quest/m2/congestion-candidates.md b/quest/m2/congestion-candidates.md deleted file mode 100644 index c1120fd933d..00000000000 --- a/quest/m2/congestion-candidates.md +++ /dev/null @@ -1,65 +0,0 @@ -# [S] The congestion selector ships BBR, and new algorithms join it additively - -## Goal - -The cut ships one public congestion-control selector that applications, the -relay's config, the CLI, and every binding use, with BBR (v3) selectable and -the default. Algorithms still under test (GCC, SCReAMv2, and BBR3's delay -bound) are not reachable from any published crate's public API, and each can -join the selector later without a breaking change. - -## Plan - -Found 2026-11-14 by the [feature review](/quest/m3/release/feature-review.md). -GCC (`rs/moq-congestion/src/gcc/`, about 16.3k vendored lines), SCReAMv2 -(`scream.rs`), and BBR3's delay bound (`bbr3::Config::delay_bound`) from -[moq-dev/moq#7546](https://github.com/moq-dev/moq/pull/7546), -[moq-dev/moq#7547](https://github.com/moq-dev/moq/pull/7547), and -[moq-dev/moq#7544](https://github.com/moq-dev/moq/pull/7544) are public in -moq-congestion 0.1.0, which has never been published, yet no session can -select them, and nothing outside tests turns on the receive timestamps GCC -needs. - -Decided 2026-11-14 (maintainer, pick on [moq-dev/moq#8764](https://github.com/moq-dev/moq/pull/8764)), -in the maintainer's words: "Add a way to select them? We need BBR for sure, -while GCC and Scream can wait for more testing I guess. So long as new -algorithms are additive." ✅ A public selector ships BBR; GCC and SCReAM are -not selectable in the cut and stay out of the published surface until tested -(rejected: delete them now and restore them for the bake-off; ship them -behind an unstable feature; publish them as they are). - -Choices made with that pick, for review: - -- The selector already exists, so extend it rather than add a second one: - `moq_tokio::quic::CongestionControl` (`#[non_exhaustive]`, with `Loss` - for CUBIC, `Delay` for BBR v3 and the default, and `None`), the relay and - CLI's `congestion_control` key, and moq-ffi's `MoqCongestionControl` in - every binding. `quic::Controller` stays the escape hatch for an - application's own controller. Its spellings ship on `release` (`delay` and - `loss` in relay configs), so keep them rather than break every deployed - config, and name each new variant after its algorithm (`gcc`, `scream`). - The docs say plainly that `delay` is BBR v3. A generated enum that a - language switches over exhaustively (Swift, Kotlin, Dart) makes a new - variant a break for its users, so give `MoqCongestionControl` a shape each - binding can grow without one before the cut. -- The delay bound is a BBR option, not a variant of its own: it bounds BBR3's - inflight from the forward-delay trend inside BBR's own state machine, so a - separate variant would duplicate BBR's settings under a second name, while a - field on a non-exhaustive `bbr3::Config` is additive. Until it is tested, - its setter is not public; it graduates as that option, or as BBR's default - if the bake-off shows it wins. -- Keep GCC and SCReAM in the tree but off the published API. Recommended: - move them into a workspace-only crate (`publish = false`) that the - bake-off's sim and integration tests use as a path dev-dependency, which - `cargo publish` drops; the vendor-sync quests follow the code. -- JS has nothing to select: browsers choose WebTransport's congestion - control, and `js/net` already asks for `low-latency`. - -[Realtime QUIC](/quest/m4/quic-realtime.md) is the bake-off that tests the -candidates and adds each winner to the selector as a variant (or the delay -bound as a BBR option). - -Public API: removes `moq_congestion::gcc`, `moq_congestion::scream`, and -`bbr3::Config::delay_bound` from the public API, none of them yet -published; `CongestionControl` and `MoqCongestionControl` are unchanged. -Wire: none. diff --git a/quest/m4/quic-realtime.md b/quest/m4/quic-realtime.md index f3e7b10f528..454bbb8eb5d 100644 --- a/quest/m4/quic-realtime.md +++ b/quest/m4/quic-realtime.md @@ -36,7 +36,9 @@ spike assumed no consumer; teleoperation uplinks are one): scheduler's grants. So the candidates group arrivals into bursts before fitting a trend, as GoogCC does. Reproduce it with `just rs quic-sim`. - Bake-off: all three candidates in parallel, each a controller - in `moq-congestion`. The moq-shaper presets `cellular-step`, + in `moq-congestion` compiled only behind its `lab` test-support feature + (for the delay bound, only its setter); a winner leaves the feature. The + moq-shaper presets `cellular-step`, `cellular-bursty` and `cellular-deep` decide it. The report states the shaper's timing jitter, measured over `near-zero`, as the noise floor of the delay signal. The BBR3 delay bound (`bbr3::Config::delay_bound`) brought @@ -60,14 +62,15 @@ spike assumed no consumer; teleoperation uplinks are one): only stops a rung on a session with a sender, so a `Realtime` that cannot probe would silently leave moq-cli, OBS, and FFI simulcast publishers with no rung disable or recovery. A candidate that cannot probe does not ship. -- Naming: add `Realtime` to `moq_tokio::quic::CongestionControl` (`realtime` - on the CLI and in TOML), which is `non_exhaustive`, so it is additive. - `Delay` keeps meaning BBR3; reword its doc line to say model-based, since - BBR does not react to queuing delay directly. A new variant rather than - upgrading `Delay`, so current users see no behavior change. +- Naming (revised 2026-11-14, below): each winner joins + `moq_tokio::quic::CongestionControl` as a variant named after its algorithm + (`gcc`, `scream` on the CLI and in TOML), which is `non_exhaustive`, so it is + additive, as is a new moq-ffi `MoqCongestionControl` constructor. `Delay` + keeps meaning BBR3, documented as model-based BBR v3. A new variant rather + than upgrading `Delay`, so current users see no behavior change. - Docs: inline only. The congestion-control lines in `doc/bin/cli.md` and `doc/lib/*` gain the new variant; no new page. -- SCReAMv2 landed as `moq_congestion::Scream` +- SCReAMv2 landed as `moq_congestion::scream::Scream` ([moq-dev/moq#7547](https://github.com/moq-dev/moq/pull/7547)). moq-quic's `tests::scream` measures it on the sim beside BBR3, and moq-tokio's `scream` integration tests over the real presets. Its estimate is a window @@ -178,7 +181,14 @@ the candidates would publish unselectable with moq-congestion's first release. Decided 2026-11-14 (maintainer, pick on [moq-dev/moq#8764](https://github.com/moq-dev/moq/pull/8764)): ✅ the cut ships BBR through the existing selector and keeps GCC, SCReAM, and the BBR3 delay -bound off the published API ([congestion selector](/quest/m2/congestion-candidates.md)). +bound off the published API. Decided 2026-11-15 (maintainer, /quest-complete, +on [moq-dev/moq#8850](https://github.com/moq-dev/moq/pull/8850)), in the +maintainer's words: "wait why a new crate? put them behind a feature then +definitely not a new crate". ✅ GCC and SCReAMv2 stay modules of +moq-congestion, compiled only behind its `lab` test-support feature, which +also gates the delay bound's setter (rejected: a separate workspace-only +crate). This supersedes the earlier record of the #8764 pick as rejecting "an +unstable feature", which paraphrased the pick rather than quoting it. This bake-off tests them, and each winner joins `CongestionControl` as a variant named after its algorithm, or, for the delay bound, a `bbr3::Config` option; losers stay out of the published API. diff --git a/rs/moq-c/src/api.rs b/rs/moq-c/src/api.rs index 44fa8216b40..90ad5b0f964 100644 --- a/rs/moq-c/src/api.rs +++ b/rs/moq-c/src/api.rs @@ -1631,7 +1631,7 @@ pub struct moq_client_config { /// Whether `quic_mtu_discovery` is present. pub has_quic_mtu_discovery: bool, - /// Congestion control family name (`loss`, `delay`, or `none`), or NULL for the backend's choice. + /// Congestion control family name (`loss` for CUBIC, `delay` for BBR v3, or `none`), or NULL for the backend's choice. pub quic_congestion_control: *const c_char, /// The length in bytes of `quic_congestion_control`. pub quic_congestion_control_len: usize, diff --git a/rs/moq-congestion/Cargo.toml b/rs/moq-congestion/Cargo.toml index 796c6f4f092..1bada257a09 100644 --- a/rs/moq-congestion/Cargo.toml +++ b/rs/moq-congestion/Cargo.toml @@ -7,11 +7,16 @@ rust-version.workspace = true repository = "https://github.com/moq-dev/moq" license = "(MIT OR Apache-2.0) AND BSD-3-Clause" +[features] +# Test support for the candidates under test and the comparisons that run them: the `gcc` and +# `scream` controllers and BBR3's delay bound. Meant for dev-dependencies; not for applications. +lab = ["dep:tracing"] + [dependencies] kio = { workspace = true } rand = { workspace = true } rand_pcg = { workspace = true } -tracing = { workspace = true } +tracing = { workspace = true, optional = true } [dev-dependencies] cpu-time = "1.0.0" diff --git a/rs/moq-congestion/README.md b/rs/moq-congestion/README.md index 554851e0397..93dbe2be474 100644 --- a/rs/moq-congestion/README.md +++ b/rs/moq-congestion/README.md @@ -1,21 +1,21 @@ # moq-congestion -BBR3, Cubic, GCC, SCReAMv2, and Unlimited congestion controllers, consumed by moq-quic and the native transport drivers. +BBR3, Cubic, and Unlimited congestion controllers, consumed by moq-quic and the native transport drivers. Applications pick one through `moq_tokio::quic::CongestionControl`, where `delay` is BBR3 and the default. -BBR3's optional delay bound (`bbr3::Config::delay_bound`) reads the peer's receive timestamps and brakes when the forward delay's trend shows the bottleneck queue growing. +Candidates still under test compile only with the `lab` test-support feature, which the comparisons in moq-quic and moq-tokio enable as a dev-dependency: the `gcc` and `scream` modules, and BBR3's delay bound (`bbr3::Config::delay_bound`), which brakes when the peer's receive timestamps show the bottleneck queue growing. A winner joins `CongestionControl` as a new variant, or BBR3 as an option, and leaves the feature. The controllers take explicit `kio::clock::Instant` values and never drive a runtime. The `Controller` trait names no transport types: `on_sent` returns an opaque per-packet state that the transport stores and hands back with each acknowledgement or loss, and the controller paces its own sends. -Construct controllers with `Factory::build` on an `Arc`, `Arc`, `Arc`, `Arc`, or `Arc`. `Unlimited` and `Metrics` live at the crate root, and `gcc::Gcc` and `scream::Scream` in their modules. +Construct controllers with `Factory::build` on an `Arc`, `Arc`, or `Arc`, and with `lab`, `Arc` or `Arc`. `Unlimited` and `Metrics` live at the crate root, and `gcc::Gcc` and `scream::Scream` in their modules. The code was extracted from [moq-quic](../moq-quic), under the same MIT or Apache-2.0 license. Cubic originated in quinn; BBR3 was ported from moq-dev/noq and carries the fixes listed in [moq-quic's fork history](../moq-quic/README.md). SCReAMv2's delay-based path was ported from draft-ietf-ccwg-rfc8298bis-screamv2 and checked against Ericsson's [reference implementation](https://github.com/EricssonResearch/scream). GCC is libwebrtc's Google Congestion Control, a delay-based controller that reads the peer's receive timestamps (draft-ietf-quic-receive-ts). `src/gcc` vendors a Rust port of WebRTC's `goog_cc` under WebRTC's BSD license, kept in [`src/gcc/LICENSE`](src/gcc/LICENSE) with its `PATENTS` grant; its module docs record the WebRTC revision it tracks and what it trims. -Controller tests run with `just rs test -p moq-congestion`. The per-packet benchmark runs nightly, or locally with: +Controller tests run with `just rs test -p moq-congestion`, and the candidates' with `--features lab`. The per-packet benchmark runs nightly, or locally with: ```sh -just rs test --release -p moq-congestion -E 'test(benchmark_per_packet)' --run-ignored only --success-output immediate +just rs test --release -p moq-congestion --features lab -E 'test(benchmark_per_packet)' --run-ignored only --success-output immediate ``` Connection characterization and simulated transport tests remain in moq-quic. diff --git a/rs/moq-congestion/src/bbr3/mod.rs b/rs/moq-congestion/src/bbr3/mod.rs index 74a843d0ff4..159bf890ca6 100644 --- a/rs/moq-congestion/src/bbr3/mod.rs +++ b/rs/moq-congestion/src/bbr3/mod.rs @@ -2131,6 +2131,10 @@ impl Config { /// /// Without receive timestamps, which the transport requests separately, it does nothing. /// Off by default. + /// + /// Test support, enabled by the `lab` feature, until the realtime bake-off decides whether it + /// ships. + #[cfg(any(test, feature = "lab"))] pub fn delay_bound(&mut self, value: bool) -> &mut Self { self.delay_bound = value; self diff --git a/rs/moq-congestion/src/gcc/mod.rs b/rs/moq-congestion/src/gcc/mod.rs index 2614226e404..34f6507f8f6 100644 --- a/rs/moq-congestion/src/gcc/mod.rs +++ b/rs/moq-congestion/src/gcc/mod.rs @@ -1,5 +1,8 @@ //! libwebrtc's Google Congestion Control (GoogCC), driven by QUIC receive timestamps. //! +//! A candidate under test, compiled only with the `lab` test-support feature: no session can +//! select it until the realtime bake-off picks it. +//! //! The submodules are a Rust port of WebRTC's `modules/congestion_controller/goog_cc`, with the //! parts of `api/transport`, `api/units`, `modules/pacing` and `modules/remote_bitrate_estimator` //! it uses. They began as [goog_cc](https://github.com/kixelated/goog_cc) 0.1.4, a port of WebRTC diff --git a/rs/moq-congestion/src/lib.rs b/rs/moq-congestion/src/lib.rs index a07b0faad22..fc4c25c5ea7 100644 --- a/rs/moq-congestion/src/lib.rs +++ b/rs/moq-congestion/src/lib.rs @@ -14,9 +14,11 @@ use std::sync::Arc; pub mod bbr3; /// CUBIC congestion control. pub mod cubic; +#[cfg(feature = "lab")] pub mod gcc; mod pacer; mod rate; +#[cfg(feature = "lab")] pub mod scream; mod unlimited; @@ -280,11 +282,13 @@ mod tests { /// The largest UDP payload (RFC 9000), whose two datagrams outgrow every 1200-based default const MTU: u16 = 65527; - fn factories() -> [(&'static str, Arc); 5] { - [ + fn factories() -> Vec<(&'static str, Arc)> { + vec![ ("bbr3", Arc::new(bbr3::Config::default())), ("cubic", Arc::new(cubic::Config::default())), + #[cfg(feature = "lab")] ("gcc", Arc::new(gcc::Config::default())), + #[cfg(feature = "lab")] ("scream", Arc::new(scream::Config::default())), ("unlimited", Arc::new(Unlimited)), ] diff --git a/rs/moq-congestion/src/rate.rs b/rs/moq-congestion/src/rate.rs index e3cd06e517a..4fb5d525c67 100644 --- a/rs/moq-congestion/src/rate.rs +++ b/rs/moq-congestion/src/rate.rs @@ -6,6 +6,7 @@ //! use kio::clock::Instant; +#[cfg(feature = "lab")] use std::num::NonZeroU16; use std::time::Duration; @@ -34,6 +35,7 @@ pub struct Packet { /// The GCC probe cluster it was sent in, if any. Sixteen bits fit the padding after the /// fields above. GoogCC's clusters and the prober's restarts each wrap within half of them, /// far more than either starts in the two seconds a cluster is kept. + #[cfg(feature = "lab")] pub(crate) probe_cluster: Option, } @@ -47,6 +49,7 @@ impl Default for Packet { lost: 0, tx_in_flight: 0, is_app_limited: false, + #[cfg(feature = "lab")] probe_cluster: None, } } @@ -121,6 +124,7 @@ impl Sampler { lost: self.lost, tx_in_flight: sent.in_flight.try_into().unwrap_or(u32::MAX), is_app_limited: self.app_limited != 0, + #[cfg(feature = "lab")] probe_cluster: None, } } diff --git a/rs/moq-congestion/src/scream.rs b/rs/moq-congestion/src/scream.rs index 286efd9e984..efea165bca0 100644 --- a/rs/moq-congestion/src/scream.rs +++ b/rs/moq-congestion/src/scream.rs @@ -1,6 +1,9 @@ //! SCReAMv2's delay-based congestion control, ported from draft-ietf-ccwg-rfc8298bis-screamv2-01. //! //! +//! A candidate under test, compiled only with the `lab` test-support feature: no session can +//! select it until the realtime bake-off picks it. +//! //! A reference window caps the bytes in flight. It grows with every byte acknowledged, and shrinks //! on loss, on classic ECN-CE, and as the averaged queue delay passes half the target, in //! proportion to how far past it is ("virtual L4S" marking). The queue delay is each packet's diff --git a/rs/moq-ffi/src/session.rs b/rs/moq-ffi/src/session.rs index 74ff7cf0ee2..65aa3c4c3ae 100644 --- a/rs/moq-ffi/src/session.rs +++ b/rs/moq-ffi/src/session.rs @@ -129,7 +129,7 @@ pub struct MoqQuicConfig { pub mtu_discovery: Option, /// The congestion control family. #[uniffi(default = None)] - pub congestion_control: Option, + pub congestion_control: Option>, /// Directory, which must exist, to write qlog traces into. Fails `new` unless /// [`moq_qlog_supported`]. #[uniffi(default = None)] @@ -141,23 +141,32 @@ pub struct MoqQuicConfig { } /// The congestion control family for a QUIC connection. -#[derive(Clone, Copy, Debug, PartialEq, Eq, uniffi::Enum)] -pub enum MoqCongestionControl { +/// +/// An immutable object rather than an enum, so a new algorithm joins as a constructor without +/// breaking callers that switch over a closed enum. +#[derive(Debug, PartialEq, Eq, Hash, uniffi::Object)] +#[uniffi::export(Debug, Eq, Hash)] +pub struct MoqCongestionControl(moq_tokio::quic::CongestionControl); + +#[uniffi::export] +impl MoqCongestionControl { /// Loss-based (CUBIC): chases throughput, so the send rate sawtooths. - Loss, - /// Delay-based (BBR): keeps queues short and the send rate steady enough for an encoder to track. - Delay, - /// No congestion control and no pacing, for tests and controlled links. - None, -} + #[uniffi::constructor] + pub fn loss() -> Arc { + Arc::new(Self(moq_tokio::quic::CongestionControl::Loss)) + } -impl From for moq_tokio::quic::CongestionControl { - fn from(family: MoqCongestionControl) -> Self { - match family { - MoqCongestionControl::Loss => Self::Loss, - MoqCongestionControl::Delay => Self::Delay, - MoqCongestionControl::None => Self::None, - } + /// Delay-based (BBR v3), the default: keeps queues short and the send rate steady enough for + /// an encoder to track. + #[uniffi::constructor] + pub fn delay() -> Arc { + Arc::new(Self(moq_tokio::quic::CongestionControl::Delay)) + } + + /// No congestion control and no pacing, for tests and controlled links. + #[uniffi::constructor] + pub fn none() -> Arc { + Arc::new(Self(moq_tokio::quic::CongestionControl::None)) } } @@ -169,7 +178,7 @@ impl From for moq_tokio::quic::Config { quic.keep_alive = config.keep_alive.map(Into::into); quic.gso = config.gso; quic.mtu_discovery = config.mtu_discovery; - quic.congestion_control = config.congestion_control.map(Into::into); + quic.congestion_control = config.congestion_control.map(|family| family.0); quic.qlog = config.qlog.map(Into::into); quic.keylog = config .keylog diff --git a/rs/moq-ffi/src/test.rs b/rs/moq-ffi/src/test.rs index 06712a49d9d..2ec21c542d1 100644 --- a/rs/moq-ffi/src/test.rs +++ b/rs/moq-ffi/src/test.rs @@ -6849,7 +6849,7 @@ async fn client_connects_with_every_knob_set() { keep_alive: Some(Duration::ZERO), gso: Some(false), mtu_discovery: Some(true), - congestion_control: Some(MoqCongestionControl::Loss), + congestion_control: Some(MoqCongestionControl::loss()), qlog: None, keylog: Some(false), }, diff --git a/rs/moq-ffi/src/test/rung.rs b/rs/moq-ffi/src/test/rung.rs index 7b7168ecad7..d2add590e7e 100644 --- a/rs/moq-ffi/src/test/rung.rs +++ b/rs/moq-ffi/src/test/rung.rs @@ -46,7 +46,7 @@ async fn shaped_uplink_disables_and_resumes() { tls: insecure_tls(), once: true, quic: MoqQuicConfig { - congestion_control: Some(MoqCongestionControl::Delay), + congestion_control: Some(MoqCongestionControl::delay()), ..Default::default() }, websocket: MoqWebSocketConfig { diff --git a/rs/moq-quic/Cargo.toml b/rs/moq-quic/Cargo.toml index 02b815f3dae..c723522fb01 100644 --- a/rs/moq-quic/Cargo.toml +++ b/rs/moq-quic/Cargo.toml @@ -57,6 +57,8 @@ criterion = { package = "bench-harness", path = "../bench-harness" } hex-literal = "1" # The tests and benches read time through the runtime, as the drivers do. kio = { path = "../kio", features = ["runtime", "sim"] } +# The candidate controllers and BBR3's delay bound the simulated comparisons run. +moq-congestion = { path = "../moq-congestion", features = ["lab"] } # The mux module's tests run in the default merge gate. moq-quic = { path = ".", features = ["mux"] } proptest = { workspace = true } diff --git a/rs/moq-tokio/Cargo.toml b/rs/moq-tokio/Cargo.toml index 0bec7dc2878..deac204ddf1 100644 --- a/rs/moq-tokio/Cargo.toml +++ b/rs/moq-tokio/Cargo.toml @@ -130,8 +130,9 @@ criterion = { package = "bench-harness", path = "../bench-harness" } # be driven with synthetic daemon events. flume = "0.12" kio = { path = "../kio", features = ["sim"] } -# The integration tests build congestion controllers directly. -moq-congestion = { path = "../moq-congestion" } +# The integration tests build congestion controllers directly, including the candidates the +# real-socket comparisons run. +moq-congestion = { path = "../moq-congestion", features = ["lab"] } # A bufferbloated path for the receive-credit tests and benchmark. moq-shaper = { path = "../moq-shaper" } # The tests run QUIC sessions on the simulator. Only `sim`, so a test build keeps the diff --git a/rs/moq-tokio/src/quic.rs b/rs/moq-tokio/src/quic.rs index 9ca9eefd766..1187f45c2b5 100644 --- a/rs/moq-tokio/src/quic.rs +++ b/rs/moq-tokio/src/quic.rs @@ -99,8 +99,9 @@ impl std::fmt::Debug for Controller { /// The congestion control family for a QUIC connection. /// -/// CUBIC is used for loss-based control and BBRv3 for delay-based control. -#[derive(Clone, Copy, Debug, PartialEq, Eq, usage_rs::ValueEnum, serde::Serialize, serde::Deserialize)] +/// CUBIC is used for loss-based control and BBR v3 for delay-based control, the default. A new +/// algorithm joins as a variant named after it. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, usage_rs::ValueEnum, serde::Serialize, serde::Deserialize)] #[usage(ignore_case)] #[serde(rename_all = "kebab-case")] #[non_exhaustive] @@ -108,7 +109,7 @@ pub enum CongestionControl { /// Loss-based (CUBIC): grows until it drops packets, so the send rate sawtooths. /// Throughput-oriented, and the default on most stacks. Loss, - /// Delay-based (BBR): tracks the measured delivery rate and RTT instead of waiting + /// Delay-based (BBR v3): tracks the measured delivery rate and RTT instead of waiting /// for loss, which keeps queues short and the send rate steady enough for an encoder /// to track. Delay, diff --git a/rs/workspace-hack/Cargo.toml b/rs/workspace-hack/Cargo.toml index 478af714887..694aabaa8b8 100644 --- a/rs/workspace-hack/Cargo.toml +++ b/rs/workspace-hack/Cargo.toml @@ -94,6 +94,7 @@ toml = { version = "1" } toml_datetime = { version = "1", features = ["serde"] } toml_parser = { version = "1" } tower = { version = "0.5", default-features = false, features = ["make", "util"] } +tracing = { version = "0.1" } tracing-core = { version = "0.1" } tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time"] } tungstenite = { version = "0.30", default-features = false, features = ["__rustls-tls", "handshake"] } @@ -183,6 +184,7 @@ toml = { version = "1" } toml_datetime = { version = "1", features = ["serde"] } toml_parser = { version = "1" } tower = { version = "0.5", default-features = false, features = ["make", "util"] } +tracing = { version = "0.1" } tracing-core = { version = "0.1" } tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time"] } tungstenite = { version = "0.30", default-features = false, features = ["__rustls-tls", "handshake"] } diff --git a/sh/gh/nightly.sh b/sh/gh/nightly.sh index a19264d2d4b..e5cb56cb9f9 100755 --- a/sh/gh/nightly.sh +++ b/sh/gh/nightly.sh @@ -116,7 +116,7 @@ case "$1" in export NEXTEST_PROFILE=bench NEXTEST_TEST_THREADS=1 nextest just rs bench-tests --no-fail-fast --run-ignored only \ -p moq-bench -p moq-congestion -p moq-quic -p moq-net -p moq-tokio -p moq-uring \ - --features moq-net/async --lib --bin moq-bench --test integration \ + --features moq-net/async,moq-congestion/lab --lib --bin moq-bench --test integration \ -E 'test(benchmark_observation_contention) | test(benchmark_readiness_establishment) | test(benchmark_per_packet) | test(benchmark_feed_fetch_wakes) | test(=mesh_sweep::benchmark_route_mesh) | test(benchmark_route_rules) | test(benchmark_route_churn) | test(benchmark_receive_credit) | test(benchmark_receive_windows) | test(benchmark_datagram_delivery) | test(benchmark_socket_queues)' ;; rust-test-apps) diff --git a/swift/Sources/Moq/Aliases.swift b/swift/Sources/Moq/Aliases.swift index 9bc378d9fa1..abb5bf3154c 100644 --- a/swift/Sources/Moq/Aliases.swift +++ b/swift/Sources/Moq/Aliases.swift @@ -104,7 +104,8 @@ public typealias ServerTls = MoqFFI.MoqServerTls /// QUIC transport tuning, such as the peer's inbound stream cap. public typealias QuicConfig = MoqFFI.MoqQuicConfig -/// The congestion control family for a QUIC connection. +/// The congestion control family for a QUIC connection. Build one with `CongestionControl.delay()`, +/// `.loss()`, or `.none()`; a new algorithm joins as a new constructor. public typealias CongestionControl = MoqFFI.MoqCongestionControl /// The WebSocket fallback raced against QUIC: whether it runs and QUIC's head start.