rwebtransport 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/Cargo.lock +666 -0
  2. package/Cargo.toml +31 -0
  3. package/LICENSE +202 -0
  4. package/NOTICE +41 -0
  5. package/README.md +550 -0
  6. package/crates/echo-server/Cargo.toml +20 -0
  7. package/crates/echo-server/src/main.rs +666 -0
  8. package/crates/native/Cargo.toml +23 -0
  9. package/crates/native/src/config.rs +129 -0
  10. package/crates/native/src/driver.rs +463 -0
  11. package/crates/native/src/lib.rs +821 -0
  12. package/crates/native/src/server.rs +718 -0
  13. package/crates/native/src/session.rs +1191 -0
  14. package/crates/native/src/tls.rs +96 -0
  15. package/crates/wtcore/Cargo.toml +15 -0
  16. package/crates/wtcore/src/h3.rs +226 -0
  17. package/crates/wtcore/src/lib.rs +9 -0
  18. package/dist/datagrams.d.ts +16 -0
  19. package/dist/errors.d.ts +10 -0
  20. package/dist/index.d.ts +7 -0
  21. package/dist/index.js +1512 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/index.mjs +1473 -0
  24. package/dist/index.mjs.map +1 -0
  25. package/dist/loader.d.ts +2 -0
  26. package/dist/native.d.ts +226 -0
  27. package/dist/server.d.ts +44 -0
  28. package/dist/streams.d.ts +14 -0
  29. package/dist/types.d.ts +24 -0
  30. package/dist/webtransport.d.ts +20 -0
  31. package/package.json +79 -0
  32. package/prebuilds/win32-x64/rwebtransport.node +0 -0
  33. package/scripts/bench.mjs +180 -0
  34. package/scripts/build.js +67 -0
  35. package/scripts/postinstall.js +67 -0
  36. package/scripts/setup-unix.sh +129 -0
  37. package/scripts/setup-windows.ps1 +229 -0
  38. package/vendor/quiche/AGENTS.md +75 -0
  39. package/vendor/quiche/COPYING +23 -0
  40. package/vendor/quiche/Cargo.lock +1212 -0
  41. package/vendor/quiche/Cargo.toml +215 -0
  42. package/vendor/quiche/README.md +466 -0
  43. package/vendor/quiche/examples/Makefile +46 -0
  44. package/vendor/quiche/examples/README.md +20 -0
  45. package/vendor/quiche/examples/cert-big.crt +90 -0
  46. package/vendor/quiche/examples/cert.crt +18 -0
  47. package/vendor/quiche/examples/cert.key +28 -0
  48. package/vendor/quiche/examples/client.c +343 -0
  49. package/vendor/quiche/examples/client.rs +281 -0
  50. package/vendor/quiche/examples/gen-certs.sh +15 -0
  51. package/vendor/quiche/examples/http3-client.c +473 -0
  52. package/vendor/quiche/examples/http3-client.rs +349 -0
  53. package/vendor/quiche/examples/http3-server.c +614 -0
  54. package/vendor/quiche/examples/http3-server.rs +680 -0
  55. package/vendor/quiche/examples/qpack-decode.rs +87 -0
  56. package/vendor/quiche/examples/qpack-encode.rs +88 -0
  57. package/vendor/quiche/examples/rootca.crt +21 -0
  58. package/vendor/quiche/examples/server.c +529 -0
  59. package/vendor/quiche/examples/server.rs +529 -0
  60. package/vendor/quiche/include/quiche.h +1282 -0
  61. package/vendor/quiche/quiche.svg +1 -0
  62. package/vendor/quiche/src/buffers.rs +105 -0
  63. package/vendor/quiche/src/build.rs +66 -0
  64. package/vendor/quiche/src/cid.rs +1079 -0
  65. package/vendor/quiche/src/crypto/boringssl.rs +373 -0
  66. package/vendor/quiche/src/crypto/mod.rs +671 -0
  67. package/vendor/quiche/src/dgram.rs +118 -0
  68. package/vendor/quiche/src/error.rs +263 -0
  69. package/vendor/quiche/src/ffi.rs +2290 -0
  70. package/vendor/quiche/src/flowcontrol.rs +246 -0
  71. package/vendor/quiche/src/frame.rs +2172 -0
  72. package/vendor/quiche/src/h3/AGENTS.md +54 -0
  73. package/vendor/quiche/src/h3/ffi.rs +442 -0
  74. package/vendor/quiche/src/h3/frame.rs +1404 -0
  75. package/vendor/quiche/src/h3/mod.rs +8223 -0
  76. package/vendor/quiche/src/h3/qpack/decoder.rs +288 -0
  77. package/vendor/quiche/src/h3/qpack/encoder.rs +235 -0
  78. package/vendor/quiche/src/h3/qpack/mod.rs +202 -0
  79. package/vendor/quiche/src/h3/qpack/static_table.rs +323 -0
  80. package/vendor/quiche/src/h3/stream.rs +1595 -0
  81. package/vendor/quiche/src/lib.rs +9556 -0
  82. package/vendor/quiche/src/minmax.rs +446 -0
  83. package/vendor/quiche/src/packet.rs +2334 -0
  84. package/vendor/quiche/src/path.rs +1374 -0
  85. package/vendor/quiche/src/pmtud.rs +652 -0
  86. package/vendor/quiche/src/rand.rs +64 -0
  87. package/vendor/quiche/src/range_buf.rs +186 -0
  88. package/vendor/quiche/src/ranges.rs +755 -0
  89. package/vendor/quiche/src/recovery/AGENTS.md +80 -0
  90. package/vendor/quiche/src/recovery/bandwidth.rs +565 -0
  91. package/vendor/quiche/src/recovery/bytes_in_flight.rs +179 -0
  92. package/vendor/quiche/src/recovery/congestion/cubic.rs +1038 -0
  93. package/vendor/quiche/src/recovery/congestion/delivery_rate.rs +514 -0
  94. package/vendor/quiche/src/recovery/congestion/hystart.rs +241 -0
  95. package/vendor/quiche/src/recovery/congestion/mod.rs +361 -0
  96. package/vendor/quiche/src/recovery/congestion/prr.rs +238 -0
  97. package/vendor/quiche/src/recovery/congestion/recovery.rs +1170 -0
  98. package/vendor/quiche/src/recovery/congestion/reno.rs +291 -0
  99. package/vendor/quiche/src/recovery/congestion/test_sender.rs +201 -0
  100. package/vendor/quiche/src/recovery/gcongestion/bbr/bandwidth_sampler.rs +1947 -0
  101. package/vendor/quiche/src/recovery/gcongestion/bbr/windowed_filter.rs +158 -0
  102. package/vendor/quiche/src/recovery/gcongestion/bbr.rs +37 -0
  103. package/vendor/quiche/src/recovery/gcongestion/bbr2/drain.rs +120 -0
  104. package/vendor/quiche/src/recovery/gcongestion/bbr2/mode.rs +318 -0
  105. package/vendor/quiche/src/recovery/gcongestion/bbr2/network_model.rs +784 -0
  106. package/vendor/quiche/src/recovery/gcongestion/bbr2/probe_bw.rs +729 -0
  107. package/vendor/quiche/src/recovery/gcongestion/bbr2/probe_rtt.rs +175 -0
  108. package/vendor/quiche/src/recovery/gcongestion/bbr2/startup.rs +190 -0
  109. package/vendor/quiche/src/recovery/gcongestion/bbr2.rs +855 -0
  110. package/vendor/quiche/src/recovery/gcongestion/mod.rs +275 -0
  111. package/vendor/quiche/src/recovery/gcongestion/pacer.rs +294 -0
  112. package/vendor/quiche/src/recovery/gcongestion/recovery.rs +1384 -0
  113. package/vendor/quiche/src/recovery/mod.rs +3086 -0
  114. package/vendor/quiche/src/recovery/rtt.rs +152 -0
  115. package/vendor/quiche/src/stream/mod.rs +2210 -0
  116. package/vendor/quiche/src/stream/recv_buf.rs +1236 -0
  117. package/vendor/quiche/src/stream/send_buf.rs +849 -0
  118. package/vendor/quiche/src/test_utils.rs +681 -0
  119. package/vendor/quiche/src/tests.rs +12922 -0
  120. package/vendor/quiche/src/tls/boringssl.rs +375 -0
  121. package/vendor/quiche/src/tls/mod.rs +1245 -0
  122. package/vendor/quiche/src/transport_params.rs +628 -0
@@ -0,0 +1,229 @@
1
+ #Requires -Version 5.1
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #
4
+ # scripts/setup-windows.ps1
5
+ #
6
+ # Prepares a Windows machine to build rwebtransport's native addon from source
7
+ # (Cloudflare quiche + BoringSSL via the boring-sys crate). On top of Rust and
8
+ # the MSVC C++ build tools, BoringSSL on Windows needs:
9
+ #
10
+ # * CMake - configures the BoringSSL build
11
+ # * NASM - assembles BoringSSL's crypto (this is the usual missing piece)
12
+ # * Go - a BoringSSL build-time code generator
13
+ # * Node - version 24 or 26 (the only supported lines)
14
+ #
15
+ # The script installs whatever is missing with winget, then points cmake at
16
+ # NASM by setting the ASM_NASM environment variable to the real nasm.exe. That
17
+ # is the exact variable cmake complains about with:
18
+ #
19
+ # CMake Error: Could not find the compiler specified in the environment
20
+ # variable ASM_NASM: C:\...\nasm.exe
21
+ #
22
+ # Run it from the repository root (an elevated shell is not required):
23
+ #
24
+ # powershell -ExecutionPolicy Bypass -File scripts\setup-windows.ps1
25
+ #
26
+ # or the equivalent npm alias:
27
+ #
28
+ # npm run setup:windows
29
+ #
30
+ # When it finishes, open a NEW terminal so the updated environment is picked up,
31
+ # then build:
32
+ #
33
+ # npm install
34
+ # npm run build
35
+
36
+ $ErrorActionPreference = 'Stop'
37
+ # A native command's non-zero exit must NOT throw: winget returns benign
38
+ # non-zero codes (e.g. "already installed"), and we inspect $LASTEXITCODE
39
+ # ourselves. This automatic variable only exists on PowerShell 7.3+; assigning
40
+ # it on 5.1 is a harmless no-op.
41
+ $PSNativeCommandUseErrorActionPreference = $false
42
+
43
+ function Write-Step($msg) { Write-Host "==> $msg" -ForegroundColor Cyan }
44
+ function Write-Ok($msg) { Write-Host " ok $msg" -ForegroundColor Green }
45
+ function Write-Note($msg) { Write-Host " !! $msg" -ForegroundColor Yellow }
46
+
47
+ if ($env:OS -ne 'Windows_NT') {
48
+ Write-Error 'This script is for Windows only.'
49
+ }
50
+
51
+ # Merge the persisted (Machine + User) PATH into the live process PATH so tools
52
+ # installed during this run become visible to Get-Command, WITHOUT dropping
53
+ # entries the launching shell injected into the process only (a profile tweak,
54
+ # a Node version manager, a VS developer shell, etc.).
55
+ function Update-SessionPath {
56
+ $reg = @(
57
+ [Environment]::GetEnvironmentVariable('Path', 'Machine'),
58
+ [Environment]::GetEnvironmentVariable('Path', 'User')
59
+ ) -join ';'
60
+ $have = $env:Path -split ';'
61
+ foreach ($p in ($reg -split ';' | Where-Object { $_ })) {
62
+ if ($have -notcontains $p) {
63
+ $env:Path += ";$p"
64
+ $have += $p
65
+ }
66
+ }
67
+ }
68
+
69
+ function Test-Tool($name) {
70
+ return [bool](Get-Command $name -ErrorAction SilentlyContinue)
71
+ }
72
+
73
+ # winget is usually on PATH, but the App Installer execution alias
74
+ # (%LOCALAPPDATA%\Microsoft\WindowsApps\winget.exe) is sometimes missing from a
75
+ # given shell's PATH, so fall back to it before giving up.
76
+ function Resolve-Winget {
77
+ $cmd = Get-Command winget -ErrorAction SilentlyContinue
78
+ if ($cmd) { return $cmd.Source }
79
+ $alias = Join-Path $env:LOCALAPPDATA 'Microsoft\WindowsApps\winget.exe'
80
+ if (Test-Path $alias) { return $alias }
81
+ return $null
82
+ }
83
+
84
+ Write-Step 'Locating winget (the Windows package manager)'
85
+ $script:winget = Resolve-Winget
86
+ if ($script:winget) {
87
+ Write-Ok "winget found ($script:winget)"
88
+ } else {
89
+ Write-Note @'
90
+ winget was not found. It ships with Windows 10 (1809+) and 11 as the "App
91
+ Installer" package. If it IS installed, open a normal (non-admin) Windows
92
+ Terminal where 'winget --version' works and run this script there, or install
93
+ App Installer from the Microsoft Store.
94
+ Continuing anyway: the script will still check your toolchain and configure
95
+ NASM, but it cannot install missing tools. Install any it reports from:
96
+ Rust https://rustup.rs CMake https://cmake.org/download/
97
+ Go https://go.dev/dl/ NASM https://www.nasm.us/ Node https://nodejs.org/
98
+ '@
99
+ }
100
+
101
+ # Install a winget package only if its command is missing.
102
+ function Install-Tool($command, $wingetId, $label, $url) {
103
+ Write-Step "Checking for $label"
104
+ if (Test-Tool $command) {
105
+ Write-Ok "$label already installed ($((Get-Command $command).Source))"
106
+ return
107
+ }
108
+ if (-not $script:winget) {
109
+ Write-Note "$label is missing; install it from $url"
110
+ return
111
+ }
112
+ Write-Host " installing $label via winget ($wingetId) ..."
113
+ & $script:winget install --id $wingetId --exact --silent `
114
+ --accept-source-agreements --accept-package-agreements
115
+ # Inspect the exit code directly (a non-zero native exit does not throw).
116
+ # 0 = installed; -1978335189 (0x8A15002B) = no applicable installer/upgrade,
117
+ # i.e. already present, which is fine.
118
+ $code = $LASTEXITCODE
119
+ if ($code -ne 0 -and $code -ne -1978335189) {
120
+ Write-Note ("winget could not install {0} (exit 0x{1:X}); install it from {2}" -f $label, $code, $url)
121
+ }
122
+ Update-SessionPath
123
+ if (Test-Tool $command) {
124
+ Write-Ok "$label installed"
125
+ } else {
126
+ Write-Note "$label is still not on PATH. Open a new terminal to re-check, or install it from $url"
127
+ }
128
+ }
129
+
130
+ Install-Tool 'cargo' 'Rustlang.Rustup' 'Rust (rustup)' 'https://rustup.rs'
131
+ Install-Tool 'cmake' 'Kitware.CMake' 'CMake' 'https://cmake.org/download/'
132
+ Install-Tool 'go' 'GoLang.Go' 'Go' 'https://go.dev/dl/'
133
+ Install-Tool 'nasm' 'NASM.NASM' 'NASM' 'https://www.nasm.us/'
134
+
135
+ if (Test-Tool 'rustup') {
136
+ Write-Step 'Ensuring the MSVC Rust toolchain (boring-sys needs MSVC, not GNU)'
137
+ rustup toolchain install stable-x86_64-pc-windows-msvc | Out-Null
138
+ # If the active default toolchain is GNU, switch the default to MSVC so the
139
+ # build actually uses it (cargo would otherwise keep using the GNU default).
140
+ $default = (& rustup default 2>$null | Out-String)
141
+ if ($default -match 'gnu') {
142
+ Write-Note 'Default Rust toolchain is GNU; switching the default to MSVC for this build.'
143
+ rustup default stable-x86_64-pc-windows-msvc | Out-Null
144
+ }
145
+ Write-Ok 'MSVC Rust toolchain ready'
146
+ }
147
+
148
+ Write-Step 'Pointing cmake at NASM (the ASM_NASM environment variable)'
149
+
150
+ function Find-Nasm {
151
+ $cmd = Get-Command nasm -ErrorAction SilentlyContinue
152
+ if ($cmd) { return $cmd.Source }
153
+ $roots = @(
154
+ "$env:ProgramFiles\NASM",
155
+ "${env:ProgramFiles(x86)}\NASM",
156
+ "$env:LOCALAPPDATA\bin\NASM",
157
+ "$env:LOCALAPPDATA\Microsoft\WinGet\Packages"
158
+ ) | Where-Object { $_ -and (Test-Path $_) }
159
+ foreach ($root in $roots) {
160
+ $hit = Get-ChildItem -Path $root -Filter nasm.exe -Recurse -ErrorAction SilentlyContinue |
161
+ Select-Object -First 1
162
+ if ($hit) { return $hit.FullName }
163
+ }
164
+ return $null
165
+ }
166
+
167
+ $nasm = Find-Nasm
168
+ if ($nasm) {
169
+ # cmake reads ASM_NASM to locate the assembler. Set it (persistently, user
170
+ # scope) to the real nasm.exe so the boring-sys build stops failing. This
171
+ # alone fixes the reported error; we deliberately do NOT rewrite the
172
+ # persistent User PATH, because reading it expanded and writing it back would
173
+ # bake %VAR% entries from REG_EXPAND_SZ to REG_SZ and lose live expansion.
174
+ [Environment]::SetEnvironmentVariable('ASM_NASM', $nasm, 'User')
175
+ $env:ASM_NASM = $nasm
176
+ # Make nasm reachable in THIS session too (process scope only).
177
+ $nasmDir = Split-Path $nasm
178
+ if (($env:Path -split ';') -notcontains $nasmDir) { $env:Path = "$nasmDir;$env:Path" }
179
+ Write-Ok "ASM_NASM = $nasm"
180
+ } else {
181
+ # Clear a stale ASM_NASM that points to a missing file (this is the exact
182
+ # state that produced the original error) so cmake can search PATH instead.
183
+ $stale = [Environment]::GetEnvironmentVariable('ASM_NASM', 'User')
184
+ if ($stale -and -not (Test-Path $stale)) {
185
+ [Environment]::SetEnvironmentVariable('ASM_NASM', $null, 'User')
186
+ Remove-Item Env:\ASM_NASM -ErrorAction SilentlyContinue
187
+ Write-Note "Removed a stale ASM_NASM that pointed to a missing file: $stale"
188
+ }
189
+ Write-Note 'NASM was not found. Install it from https://www.nasm.us/ and re-run this script.'
190
+ }
191
+
192
+ Write-Step 'Checking for the MSVC C++ build tools'
193
+ $hasVc = Test-Tool 'cl'
194
+ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
195
+ if (-not $hasVc -and (Test-Path $vswhere)) {
196
+ $vc = & $vswhere -latest -products * `
197
+ -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
198
+ -property installationPath
199
+ if ($vc) { $hasVc = $true }
200
+ }
201
+ if ($hasVc) {
202
+ Write-Ok 'MSVC C++ build tools found'
203
+ } else {
204
+ Write-Note @'
205
+ The MSVC C++ build tools were not detected. BoringSSL needs a C/C++ compiler.
206
+ Install the "Desktop development with C++" workload, for example:
207
+ winget install --id Microsoft.VisualStudio.2022.BuildTools --exact --override "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --quiet --wait"
208
+ or add that workload from the Visual Studio Installer.
209
+ '@
210
+ }
211
+
212
+ Write-Step 'Checking Node.js (rwebtransport supports 24 and 26 only)'
213
+ if (Test-Tool 'node') {
214
+ $nodeVer = (& node -v).TrimStart('v')
215
+ $major = [int]($nodeVer.Split('.')[0])
216
+ if ($major -eq 24 -or $major -eq 26) {
217
+ Write-Ok "Node $nodeVer"
218
+ } else {
219
+ Write-Note "Node $nodeVer is not supported. Install Node 24 or 26 (https://nodejs.org or nvm-windows)."
220
+ }
221
+ } else {
222
+ Write-Note 'Node.js was not found. Install Node 24 or 26 from https://nodejs.org.'
223
+ }
224
+
225
+ Write-Host ''
226
+ Write-Step 'Setup finished.'
227
+ Write-Host 'Open a NEW terminal so the updated environment is picked up, then run:' -ForegroundColor Cyan
228
+ Write-Host ' npm install'
229
+ Write-Host ' npm run build'
@@ -0,0 +1,75 @@
1
+ # quiche/ — Core QUIC + HTTP/3 Library
2
+
3
+ ## OVERVIEW
4
+
5
+ Low-level QUIC transport and HTTP/3 in Rust. App provides IO/timers; this crate handles protocol state. Also exposes C FFI via `staticlib`/`cdylib`.
6
+
7
+ ## STRUCTURE
8
+
9
+ ```
10
+ src/
11
+ lib.rs (9k lines) Connection struct, Config, connect()/accept() entry points
12
+ h3/
13
+ mod.rs (7.5k) HTTP/3 connection — own Error/Result types, NOT quiche::Error
14
+ qpack/ QPACK header compression
15
+ recovery/
16
+ mod.rs Recovery enum, RecoveryOps trait (enum_dispatch)
17
+ congestion/ Legacy CC (Cubic, Reno, Hystart++)
18
+ gcongestion/ Google-derived CC (BBR2) — behind `gcongestion` feature
19
+ stream/ Stream state machine, flow control per-stream
20
+ tls/ TLS backend abstraction (BoringSSL)
21
+ crypto/ Packet protection, key derivation
22
+ packet.rs (2.3k) Packet parsing, ConnectionId, Header
23
+ frame.rs QUIC frame encode/decode
24
+ path.rs Multi-path state, PathEvent, migration
25
+ pmtud.rs Path MTU discovery
26
+ cid.rs Connection ID management
27
+ ffi.rs (2.3k) C FFI — behind `ffi` feature
28
+ transport_params.rs QUIC transport parameter encode/decode
29
+ flowcontrol.rs Connection-level flow control
30
+ ranges.rs ACK range tracking
31
+ buffers.rs BufFactory/BufSplit/DefaultBufFactory traits and types
32
+ range_buf.rs RangeBuf — ordered byte buffer for stream reassembly
33
+ dgram.rs DATAGRAM frame support
34
+ rand.rs Random number generation
35
+ minmax.rs Windowed min/max filter
36
+ test_utils.rs Pipe struct for in-memory QUIC pairs (pub via `internal` feature)
37
+ tests.rs (12k) Integration tests
38
+ build.rs Link directives + pkg-config metadata (NOTE: lives in src/, not crate root)
39
+ include/
40
+ quiche.h (1.2k) C API header — mirrors ffi.rs
41
+ ```
42
+
43
+ BoringSSL itself is built by `boring-sys` (no in-tree submodule).
44
+
45
+ ## WHERE TO LOOK
46
+
47
+ | Task | Start here |
48
+ |------|-----------|
49
+ | Connection lifecycle | `lib.rs` — `Connection` struct, `recv()`, `send()` |
50
+ | HTTP/3 streams/headers | `h3/mod.rs` — `h3::Connection` |
51
+ | Loss detection / CC | `recovery/mod.rs` → `congestion/` or `gcongestion/` |
52
+ | Packet parse/serialize | `packet.rs`, `frame.rs` |
53
+ | TLS handshake | `tls/mod.rs` — cfg-gated per backend |
54
+ | C bindings | `ffi.rs` + `include/quiche.h` |
55
+ | Test harness | `test_utils.rs` (`Pipe` struct) |
56
+ | Build system | `src/build.rs` — link directives + pkg-config metadata (BoringSSL is built by `boring-sys`) |
57
+
58
+ ## ANTI-PATTERNS
59
+
60
+ - **h3::Error != quiche::Error** — don't mix or convert carelessly; they have different variant sets.
61
+ - **`Error::Done` is a success signal** in many read/write loops — not a failure.
62
+ - **Don't add new CC impls** outside `recovery/` — two parallel impls (congestion + gcongestion) already exist.
63
+ - **`unsafe` only at FFI boundaries** — `tls/`, `crypto/`, `ffi.rs`; don't add elsewhere.
64
+ - **`#[cfg(feature = "fuzzing")]`** disables real crypto — never accidentally gate non-test code on it.
65
+
66
+ ## NOTES
67
+
68
+ - `build.rs` is at `src/build.rs` (Cargo.toml: `build = "src/build.rs"`), not crate root. Emits link directives and, with `pkg-config-meta`, writes `quiche.pc`; BoringSSL itself is built by `boring-sys`.
69
+ - Single TLS backend: `boringssl-boring-crate` (default), via the `boring`/`boring-sys` crates.
70
+ - `quiche::Error` is `Copy + Clone` — intentional for hot-path ergonomics.
71
+ - `test_utils::Pipe` exposed via `internal` feature for downstream crate integration tests.
72
+ - Tests use `rstest` with `#[values("cubic", "bbr2_gcongestion")]` parameterization for CC coverage.
73
+ - `BORING_BSSL_PATH` env var (consumed by `boring-sys`) points at a custom BoringSSL source tree.
74
+ - Crate-type: `lib` + `staticlib` + `cdylib` — the latter two for C consumers.
75
+ - `BufFactory` trait (`buffers.rs`) enables zero-copy buffer creation; `Connection<F>` is generic over it.
@@ -0,0 +1,23 @@
1
+ Copyright (C) 2018-2019, Cloudflare, Inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in the
12
+ documentation and/or other materials provided with the distribution.
13
+
14
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
18
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.