Skip to content

Commit 42a78f7

Browse files
committed
Merge branch 'develop'
* develop: (55 commits) chore(release): prepare for 0.0.13 test: extend path-validation state transition regressions docs: expand README with practical client/server examples test: add RTT ack-delay boundary and empty-ack regressions test: extend recovery gate and persistent-reset model vectors test: add strict loss-time threshold boundary regression test: add repeated-loss floor and post-reset growth vectors test: expand packet bookkeeping and sent-history lifecycle vectors test: add MAX_STREAMS and MAX_STREAM_DATA monotonic regressions test: add PTO noop and path validation replacement regressions test: add ACK-round retransmission queue ordering regression test: cover replayed-ack loss frontier progression test: add path validation queue and mismatch regressions test: add max-observed and explicit-ack-list regressions test: add amplification saturation and budget-min regressions test: cover PTO non-ack deadline and probe sizing test: add PTO probe queue and deadline refresh regressions test: add congestion residual-ack and reset-state regressions test: add sent-history isolation and unsent-ack semantics test: add PTO reset and backoff-cap regressions ...
2 parents 40862cb + 214ec0a commit 42a78f7

19 files changed

Lines changed: 4748 additions & 2108 deletions

ACKNOWLEDGMENTS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Acknowledgements
2+
3+
Some codebases are references. Some are reality checks. LSQUIC was both.
4+
5+
libfast's transport-level parity work benefited massively from studying and
6+
cross-checking against LSQUIC behavior and tests.
7+
8+
- **[LSQUIC](https://github.com/litespeedtech/lsquic)**
9+
- **Docs**: https://lsquic.readthedocs.io/
10+
11+
Thank you to the LSQUIC project for publishing rigorous QUIC work openly - it
12+
made this library better.

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,78 @@
11
# Changelog
22

3+
## [0.0.13] - 2026-03-02
4+
5+
### <!-- 1 -->🐛 Bug Fixes
6+
7+
- Enforce strict drain deadline expiry semantics
8+
9+
### <!-- 2 -->🚜 Refactor
10+
11+
- Split connection CID and reset tests into module
12+
- Split connection retry/VN tests into dedicated module
13+
- Split connection frame-legality tests into separate file
14+
15+
### <!-- 3 -->📚 Documentation
16+
17+
- Expand README with practical client/server examples
18+
- Add concise lsquic acknowledgment
19+
- Thank lsquic project and contributors
20+
21+
### <!-- 6 -->🧪 Testing
22+
23+
- Extend path-validation state transition regressions
24+
- Add RTT ack-delay boundary and empty-ack regressions
25+
- Extend recovery gate and persistent-reset model vectors
26+
- Add strict loss-time threshold boundary regression
27+
- Add repeated-loss floor and post-reset growth vectors
28+
- Expand packet bookkeeping and sent-history lifecycle vectors
29+
- Add MAX_STREAMS and MAX_STREAM_DATA monotonic regressions
30+
- Add PTO noop and path validation replacement regressions
31+
- Add ACK-round retransmission queue ordering regression
32+
- Cover replayed-ack loss frontier progression
33+
- Add path validation queue and mismatch regressions
34+
- Add max-observed and explicit-ack-list regressions
35+
- Add amplification saturation and budget-min regressions
36+
- Cover PTO non-ack deadline and probe sizing
37+
- Add PTO probe queue and deadline refresh regressions
38+
- Add congestion residual-ack and reset-state regressions
39+
- Add sent-history isolation and unsent-ack semantics
40+
- Add PTO reset and backoff-cap regressions
41+
- Add PTO deadline and retransmission ordering regressions
42+
- Add drain timeout clamp boundary regressions
43+
- Add ACK ordering and replay idempotence regressions
44+
- Add recovery exit and window boundary vectors
45+
- Cover recovery epoch rollover and inflight saturation
46+
- Add congestion avoidance ack-growth vector
47+
- Add congestion lifecycle stability regression
48+
- Add mixed ACK-loss send lifecycle regression
49+
- Add packet bookkeeping interop vectors
50+
- Add packet buffer capacity ladder interop vectors
51+
- Add lsquic stream frame generation vectors
52+
- Keep latest NEW_TOKEN across multi-frame packet
53+
- Add lsquic packet header generation vectors
54+
- Add lsquic RTT progression parity vector
55+
- Add ack-merge duplicate packet regression
56+
- Add lsquic varint and ACK capacity interop vectors
57+
- Expand interop module with ACK and short-header truncation
58+
- Add malformed VN vectors to interop module
59+
- Add dedicated lsquic interop vector module
60+
- Add lsquic-style control-frame truncation matrix
61+
- Add lsquic-style ACK truncation corpus
62+
- Add lsquic-style packet truncation decode corpus
63+
- Extend lsquic ACK sparse and packet-number vectors
64+
- Extend malformed packet corpus for oversized CID lengths
65+
- Add lsquic ACK and packet-number compatibility vectors
66+
- Add lsquic compatibility vectors for varint and VN
67+
68+
### <!-- 7 -->⚙️ Miscellaneous Tasks
69+
70+
- Gate live lsquic interop behind env toggle
71+
72+
### Build
73+
74+
- Add optional live lsquic interop harness target
75+
376
## [0.0.12] - 2026-03-01
477

578
### <!-- 0 -->⛰️ Features

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build test test-dual-mode ci install
1+
.PHONY: build test test-dual-mode interop-live ci install
22

33
build:
44
zig build -Doptimize=ReleaseFast
@@ -9,9 +9,13 @@ test:
99
test-dual-mode:
1010
zig build test-dual-mode-regression --summary all
1111

12+
interop-live:
13+
./tools/lsquic_live_interop.sh
14+
1215
ci:
1316
zig build test-dual-mode-regression --summary all
1417
zig build test --summary all
18+
@if [ "$(LIBFAST_RUN_LIVE_INTEROP)" = "1" ]; then ./tools/lsquic_live_interop.sh; else echo "Skipping live LSQUIC interop (set LIBFAST_RUN_LIVE_INTEROP=1 to enable)"; fi
1519
zig build -Doptimize=ReleaseFast
1620

1721
install: build

PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
libfast
2-
0.0.12
2+
0.0.13

README.md

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,29 @@ pub fn main() !void {
7171
defer conn.deinit();
7272
7373
// Connect and use streams
74-
try conn.connect("192.0.2.1:4433");
75-
var stream = try conn.openStream();
76-
try stream.write("Hello, QUIC!");
74+
try conn.connect("192.0.2.1", 4433);
75+
76+
// Your app drives progress by polling.
77+
while (true) {
78+
try conn.poll();
79+
80+
while (conn.nextEvent()) |ev| switch (ev) {
81+
.connected => {
82+
const sid = try conn.openStream(true);
83+
_ = try conn.streamWrite(sid, "Hello over QUIC", .no_finish);
84+
},
85+
.stream_readable => |sid| {
86+
var buf: [1024]u8 = undefined;
87+
const n = try conn.streamRead(sid, &buf);
88+
std.debug.print("stream {} read {s}\n", .{ sid, buf[0..n] });
89+
},
90+
.closing => |c| {
91+
std.debug.print("closing: {d} {s}\n", .{ c.error_code, c.reason });
92+
},
93+
.closed => return,
94+
else => {},
95+
};
96+
}
7797
}
7898
```
7999

@@ -88,6 +108,30 @@ var conn = try libfast.QuicConnection.init(allocator, config);
88108
// ... rest is identical
89109
```
90110

111+
### Usage Example (Server Loop)
112+
113+
```zig
114+
const config = libfast.QuicConfig.sshServer("obfuscation-keyword");
115+
var conn = try libfast.QuicConnection.init(allocator, config);
116+
defer conn.deinit();
117+
118+
try conn.accept("0.0.0.0", 4433);
119+
120+
while (true) {
121+
try conn.poll();
122+
123+
while (conn.nextEvent()) |ev| switch (ev) {
124+
.stream_readable => |sid| {
125+
var buf: [2048]u8 = undefined;
126+
const n = try conn.streamRead(sid, &buf);
127+
_ = try conn.streamWrite(sid, buf[0..n], .no_finish); // echo
128+
},
129+
.closed => return,
130+
else => {},
131+
};
132+
}
133+
```
134+
91135
## Project Structure
92136

93137
```
@@ -136,12 +180,17 @@ lib/
136180

137181
Build the library:
138182
```bash
139-
zig build
183+
make build
140184
```
141185

142186
Run tests:
143187
```bash
144-
zig build test
188+
make test
189+
```
190+
191+
Run dual-mode regression tests:
192+
```bash
193+
make test-dual-mode
145194
```
146195

147196
Run examples:
@@ -154,7 +203,7 @@ zig build run-tls-client
154203

155204
## Testing
156205

157-
200+ unit tests covering:
206+
500+ unit tests covering:
158207
- Core protocol (packets, frames, streams)
159208
- SSH crypto (obfuscation, key exchange)
160209
- TLS crypto (handshake, key schedule)
@@ -190,12 +239,11 @@ zig build test --summary all
190239
- Documentation
191240

192241
### Future Enhancements
193-
- Path validation and migration
194-
- Full integration testing
195-
- Performance optimization
196-
- Interoperability testing
197-
- TLS certificate validation
198-
- Out-of-order packet buffering
242+
- Congestion-control model expansion (Cubic/BW-sampler parity vectors)
243+
- Additional live interop lanes and environment matrix coverage
244+
- Performance profiling and optimization
245+
- TLS certificate validation hardening
246+
- Extended end-to-end scenario testing
199247

200248
## Dependencies
201249

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .libfast,
3-
.version = "0.0.12",
3+
.version = "0.0.13",
44
.dependencies = .{
55
// zquic removed - building custom minimal QUIC for SSH/QUIC
66
},

0 commit comments

Comments
 (0)