1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! Courierust — a self-contained HTTP/1.1 + HTTP/2 + gRPC stack.
//!
//! The protocol core (`courierust_http`, `courierust_hpack`,
//! `courierust_h2`, `courierust_fingerprint`, `courierust_crypto`,
//! `courierust_bytes`, `courierust_io`) compiles on `no_std + alloc`
//! with **zero** third-party dependencies. The `std` feature (enabled by
//! default) adds the threaded networking layer: `courierust_pool`
//! (work-stealing scheduler), `courierust_net`, `courierust_client`,
//! `courierust_server` and `courierust_grpc`.
//!
//! Every public module carries the crate's `courierust_` prefix so no
//! module path collides with a third-party crate of the same short name
//! (e.g. `h2`, `http`, `bytes`, `grpc`, `tls`).
//!
//! Design highlights:
//!
//! * **Multi-core parallelism** — a work-stealing thread pool with
//! per-worker LIFO caches and a global FIFO steal queue; client pools are
//! shared per authority, and HTTP/2 requests are assigned to the least
//! reserved accepting driver up to `max_connections_per_host`.
//! * **RFC 9218 client priority frames** (`PRIORITY_UPDATE`, frame type
//! `0x10`) with a Weighted-Urgency Calendar Scheduler (WUCS): eight
//! urgency buckets combined with Deficit Round Robin anti-starvation
//! and round-robin interleaving for incremental streams — O(1)
//! scheduling decision.
//! * **Batched Credit Reflow (BCR)** flow control — received data is
//! acknowledged in batches rather than one `WINDOW_UPDATE` per frame,
//! cutting control-frame overhead.
//! * **Table-driven HPACK** — 8-bit two-level Huffman decode tables and a
//! hash-accelerated static/dynamic header index fast path.
//! * **Fingerprint profiles** — exact Chrome HTTP/2 settings/header
//! ordering plus JA3/JA4 TLS `ClientHello` parameter profiles with
//! self-contained MD5/SHA-256, so a browser-shaped fingerprint can be
//! fed to an external TLS layer of your choice.
//!
//! TLS 1.3 (RFC 8446) is implemented from scratch under the `std`
//! feature (`courierust_tls` module) — client and server handshakes,
//! X.25519 key exchange, AES-GCM / ChaCha20-Poly1305 record protection,
//! and X.509 chain validation — so `https://` is a first-class
//! capability on both the client and the server. The protocol core stays
//! `no_std + alloc` with zero third-party dependencies; the transport
//! traits let the same codecs also run over an externally supplied TLS
//! stream.
extern crate alloc;
extern crate std;
pub use Bytes;
pub use ;