Skip to content

Add multipath #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 288 commits into
base: iroh-0.11.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
1e7358c
proto: Use event as param to handle_first_packet
gretchenfrage Dec 23, 2024
3e3db6f
proto: Remove most return statements from handle
gretchenfrage Dec 23, 2024
ffbd15f
proto: Use match for grease with reserved version
gretchenfrage Dec 23, 2024
3f0afae
Add gretchenfrage as a maintainer
djc Dec 23, 2024
23b18f2
proto: remove redundant cursors
Ralith Dec 26, 2024
f5b1ec7
proto: Replace calls to Duration::new
gretchenfrage Dec 26, 2024
c32e2e2
fix(udp/windows): set socket option IPV6_RECVECN
mxinden Jan 5, 2025
fbc795e
fix(udp/windows): set socket option IP_RECVECN
mxinden Jan 6, 2025
e51d0e4
Add gretchenfrage as a quinn-udp owner
djc Jan 7, 2025
3c3d460
ci: run quinn-udp tests with fast-apple-datapath
mxinden Jan 9, 2025
6bfd248
tests: avoid ICE in beta
djc Jan 10, 2025
823108a
add PathId
divagant-martian Jan 16, 2025
350fd9f
add transport parameter
divagant-martian Jan 16, 2025
f3f1a44
add new frames and their tests
divagant-martian Jan 16, 2025
b6b7312
Add a test that check multipath gets negotiated properly. (#30)
flub Jan 16, 2025
24d33a7
add saturating_add for PathId
divagant-martian Jan 16, 2025
37df8d0
Associate each ConnectionId to a PathId (#31)
divagant-martian Jan 16, 2025
7d87dc9
fix(.github/codecov): Ignore aws-lc-rs-fips for codecov
dongcarl Oct 29, 2024
cc1cf6f
Add comments w/re keeping features in sync
dongcarl Jan 17, 2025
a5e9504
feat(quinn,quinn-udp): Disable `socket2` and `std::net::UdpSocket` de…
matheus23 Jan 3, 2025
d7146d3
Remove redundant step names
matheus23 Nov 12, 2024
c443147
Prefer `sleep` instead of `sleep_until` with `Instant::now`
matheus23 Nov 12, 2024
d5e63d8
ci: powerset --clean-per-run
gretchenfrage Jan 4, 2025
2125b36
Simplify weirdly broken test code
djc Jan 21, 2025
16f3415
create NewConnectionId with method instead of inlined code (#35)
divagant-martian Jan 24, 2025
af1b428
include path_id in packet protection (#36)
divagant-martian Jan 24, 2025
273f7c2
proto: Factor out NewToken frame struct
gretchenfrage Dec 24, 2024
df22e27
proto: Rename RetryToken -> Token
gretchenfrage Dec 24, 2024
22c1270
proto: Split out RetryTokenPayload
gretchenfrage Dec 24, 2024
b237cd7
proto: Change how tokens are encrypted
gretchenfrage Dec 24, 2024
9e1f77c
Create Incoming.may_retry API
gretchenfrage Dec 24, 2024
78bfa5b
proto: Convert TokenPayload into enum
gretchenfrage Dec 24, 2024
195a781
Allow server to use NEW_TOKEN frames
gretchenfrage Dec 24, 2024
af2c1fa
Allow client to use NEW_TOKEN frames
gretchenfrage Dec 24, 2024
5a572e0
test(proto): Refactor IncomingConnectionBehavior
gretchenfrage Nov 24, 2024
ee29715
test(proto): Enable NEW_TOKEN usage in tests
gretchenfrage Jan 23, 2025
d2acbc3
test(proto): Create tests::token module
gretchenfrage Jan 24, 2025
bb54bc4
test(proto): Add tests for NEW_TOKEN frames
gretchenfrage Jan 23, 2025
eaaeada
update transport parameter for draft 12 (#37)
divagant-martian Jan 27, 2025
b5a4f46
progress in addressing some ToDos
divagant-martian Jan 27, 2025
0f1df20
Address ToDo about packet protection and 0rtt validation (#38)
flub Jan 27, 2025
c04b6a9
take advantage of the fact that packet protection with and without mu…
divagant-martian Jan 27, 2025
69c00eb
test(proto): Fix wasm CI
gretchenfrage Jan 26, 2025
13decb4
fix(quinn): `impl tokio::io::AsyncWrite for SendStream`
matheus23 Jan 27, 2025
30ca274
Different approach: add a PacketNumberSpace
flub Jan 28, 2025
989e875
Most in spaces.rs is done
flub Jan 29, 2025
6f5023f
Allow the NCSA license
djc Jan 30, 2025
f4172ea
Upgrade to rand 0.9
djc Jan 28, 2025
b4378bb
add test for retry token expired
yohachiSuga Jan 25, 2025
e5321d1
whatever this is
flub Feb 4, 2025
618c25c
more stuff
flub Feb 4, 2025
ab8f0ab
stuff
flub Feb 5, 2025
8e94b69
it compiles
flub Feb 7, 2025
47299fb
Always use the data space here, for... reasons?
flub Feb 7, 2025
5739c71
Rename to for_path
flub Feb 10, 2025
23ae622
Use the PathId stored in the PacketBuilder
flub Feb 10, 2025
2b5297d
rename the iterators too
flub Feb 10, 2025
ff38a2a
add some todos
flub Feb 10, 2025
43877d2
Different approach: add a PacketNumberSpace (#41)
flub Feb 10, 2025
a40bc68
Clippy lints
flub Feb 10, 2025
a0d3323
sources and licenses tweaks
flub Feb 10, 2025
9eb4ffe
remove legacy numeric import
flub Feb 10, 2025
f943a71
more licenses
flub Feb 10, 2025
6ee9d1e
Fixup lints so we can have clean CI (#43)
flub Feb 10, 2025
6fd280b
Kind of do tail-loss probes correctly
flub Feb 11, 2025
2481c58
Add the multipath transport error codes
flub Feb 11, 2025
4a05a4a
Kind of do tail-loss probes correctly (#44)
flub Feb 11, 2025
a8a2571
Add the multipath transport error codes (#45)
flub Feb 12, 2025
f582bc8
fix(udp/fast-apple): ignore empty cmsghdr
mxinden Feb 12, 2025
f4bd4c2
chore(udp): increase crate patch version to v0.5.10
mxinden Feb 12, 2025
b30f7eb
Start adding CID-PathId mapping
flub Feb 18, 2025
1b927a1
compiles
flub Feb 18, 2025
4757c7a
fix tests
flub Feb 18, 2025
2ba600b
Eliminating an Instant::now() in BBR bandwidth estimation code
recatek Feb 18, 2025
32e86ce
some smaller cleanups
flub Feb 19, 2025
85b2427
Start adding CID-PathId mapping (#46)
flub Feb 20, 2025
1ef5e02
Apply suggestions from clippy 1.85
djc Feb 21, 2025
a880713
Switch to 2024 style
djc Feb 21, 2025
04d8781
Use ready!() from std
djc Feb 21, 2025
56ae894
Ignore that *ring* is unmaintained, for now
djc Feb 22, 2025
161274f
Makes poll_read_buf public
Kannen Feb 22, 2025
9430972
Bump quinn-proto dependency edge
Ralith Feb 23, 2025
a7821ff
proto: fix compatibility with older quinn
Ralith Feb 23, 2025
882fdf2
WIP: issue per-path CIDs and keep track of them
flub Feb 24, 2025
5760c60
the missing bits
flub Feb 25, 2025
65256da
some more todos
flub Feb 25, 2025
3b1f89b
do the CID -> PathId mapping in the endpoint
flub Feb 26, 2025
57800f0
fixup
flub Feb 26, 2025
9ed0145
and use the correct pathid in test as well now
flub Feb 26, 2025
04a7b0e
format
flub Feb 26, 2025
08ac43f
clippy demands brackets
flub Feb 26, 2025
1e3b7e8
WIP: issue per-path CIDs and keep track of them (#47)
flub Feb 26, 2025
2f19f38
Keep CIDs per path in the endpoint
flub Feb 27, 2025
01592b6
Keep CIDs per path in the endpoint (#48)
flub Feb 27, 2025
67ccddb
Use FxHashMap for CID tracking
flub Feb 27, 2025
ea23a93
Add cid len check to enable multipath
flub Feb 27, 2025
68205a5
obsolete todo
flub Feb 27, 2025
f96aba2
fixup comment
flub Feb 27, 2025
3edc64a
more comments fixing
flub Feb 27, 2025
d17f934
the endpoint now does this
flub Feb 27, 2025
11a42b8
Use a better default cid len if missing
flub Feb 27, 2025
8d6e48c
move sending path_challenge to its own function
divagant-martian Feb 26, 2025
49ae8fe
add some todos
flub Feb 27, 2025
82abfdc
fmt
flub Feb 27, 2025
2f925fa
A bunch of smaller fixes (#49)
flub Feb 27, 2025
c1b7cc9
Send path_new_cid frames
flub Feb 27, 2025
ecd92e8
WIP: Send CIDs for new paths correctly, if requested
flub Feb 28, 2025
fa9dae7
Issue path CIDs at connection start
flub Feb 28, 2025
9292932
Add a todo
flub Feb 28, 2025
0dbebef
Send path_new_cid frames (#50)
flub Feb 28, 2025
9dff97d
Add PATH_CIDS_BLOCKED frame
flub Mar 3, 2025
b6823a7
Add PATH_CIDS_BLOCKED frame (#51)
flub Mar 3, 2025
a62c56c
Don't queue a PING for a TLP if there's already an IMMEDIATE_ACK
Ralith Mar 7, 2025
8b464de
Account for queued application datagrams when composing TLPs
Ralith Mar 7, 2025
490094b
Ignore key discard timer when detecting activity in unit tests
Ralith Mar 7, 2025
a3f88b3
Ignore advisory for `paste` being unmaintained
Ralith Mar 7, 2025
d8302df
Remove obsolete advisory ignore rule
Ralith Mar 8, 2025
55845bd
Prefer sending extra ping again
flub Mar 17, 2025
434c358
fix: Do not produce tail-loss probes larger than segment size
flub Mar 3, 2025
db89fbd
path is a map (#52)
divagant-martian Mar 24, 2025
ecc5e7d
Version Cargo lockfile
djc Mar 24, 2025
1c27b02
Use Cargo.lock in CI jobs
djc Mar 24, 2025
83b48b5
feat: Allow changing the UDP send/receive buffer sizes
larseggert Mar 25, 2025
f7e321c
Avoid inference hazard for integer comparisons
djc Mar 25, 2025
cc7608a
fix: Respect max_datagrams when tail-loss probes happen and initial m…
filipe-cantarelli Mar 24, 2025
f8165c3
refactor: move max_datagrams limit at poll_transmit from quinn-proto …
filipe-cantarelli Mar 24, 2025
41f7d2e
docs: separate example code from document
kota-yata Mar 29, 2025
eec45e6
book: fix example code
djc Mar 30, 2025
bbf9510
book: fix code references
djc Mar 30, 2025
3d019b3
book: clean up formatting
djc Mar 30, 2025
3610629
book: suppress warnings in code samples
djc Mar 30, 2025
2447c2e
book: merge certificate code files
djc Mar 30, 2025
62fc039
book: rename certificate-insecure to certificate
djc Mar 30, 2025
ab0596a
book: rely on implicit targets
djc Mar 30, 2025
48e0bb3
book: import more types
djc Mar 30, 2025
d948de6
book: order certificate code in top-down order
djc Mar 30, 2025
a196f7c
book: simplify connection setup constants
djc Mar 30, 2025
6b6d115
book: order set-up-connection code in top-down order
djc Mar 30, 2025
a788429
book: order data-transfer code in top-down order
djc Mar 30, 2025
e960c33
book: remove unused dependency
djc Mar 30, 2025
f63d962
book: remove obsolete rustls features
djc Mar 30, 2025
2f60681
book: specify dependency versions
djc Mar 30, 2025
c94fa9b
build(deps): bump socket2 from 0.5.8 to 0.5.9
dependabot[bot] Mar 31, 2025
bc1125c
Update semver-compatible dependencies
djc Apr 7, 2025
36d2b85
Apply suggestions from clippy 1.86
djc Apr 7, 2025
deba4ee
Merge branch 'main' into multipath-quinn-0.11.x
flub Apr 8, 2025
97ed76f
Merge branch 'main' into flub/merge-main-apr-8
flub Apr 10, 2025
cd3dd00
fix lint
flub Apr 10, 2025
2127f52
Disable the slow CI tests
flub Apr 10, 2025
c2f364e
Flub/merge main apr 8 (#53)
flub Apr 10, 2025
e779ef6
Introduce a TransmitBuf struct
flub Apr 10, 2025
3aa89b4
Pass the TransmitBuf directly to the PacketBuilder
flub Apr 10, 2025
147e602
Move allocating new datagrams into TransmitBuf
flub Apr 10, 2025
bf3e3b2
Move simple field access to accessor functions
flub Apr 10, 2025
52c0ac6
Do not pass buffer around as a Vec
flub Apr 10, 2025
e360832
Switch PacketBuilder to use TransmitBuf
flub Apr 10, 2025
abe357d
Finish packets at end of each poll_transmit loop
flub Apr 11, 2025
9d5bf92
Remove mutable send_frames Option
flub Apr 11, 2025
4f05bd5
Remove Option from SentFrames argument for finish_and_track
flub Apr 11, 2025
23abc37
Make the PacketBuilder own the TransmitBuf
flub Apr 11, 2025
96cc2f2
Make PacketBuilder manage available frame space
flub Apr 11, 2025
16eea5b
Remove BufMut impl on PacketBuilder again
flub Apr 11, 2025
ff356c7
Remove PacketBuilder::datagram_start
flub Apr 11, 2025
b062df3
Improve comments
flub Apr 11, 2025
a0ba958
Move pad_datagram to PacketBuilder::finish_and_track
flub Apr 11, 2025
0cb9867
Flub/poll transmit ref (#54)
flub Apr 11, 2025
8f1a529
quinn-udp: handle EMSGSIZE in a common place
thomaseizinger Apr 11, 2025
56e19b8
refactor(quinn-udp): favor early-return for `send` impls
thomaseizinger Apr 12, 2025
3391e7a
refactor(quinn-udp): favor early-return for `recv` impls
thomaseizinger Apr 12, 2025
075c7ef
refactor(quinn-udp): avoid blocks in `match` arms
thomaseizinger Apr 12, 2025
3e81eb0
refactor(quinn-udp): remove redundant match-arms
thomaseizinger Apr 12, 2025
c7687f7
refactor(quinn-udp): use `match` blocks in `recv`
thomaseizinger Apr 12, 2025
e345964
ack-frequencies is allowed together with multipath
flub Apr 14, 2025
ff58f71
ack-frequencies is allowed together with multipath (#55)
flub Apr 15, 2025
74d2cc5
Use the min rtt for ack-frequency computation
flub Apr 15, 2025
7d5fef2
Use the min rtt for ack-frequency computation (#56)
flub Apr 15, 2025
107dd92
ci: run macOS tests conditionally on runner OS
thomaseizinger Apr 16, 2025
3f94660
ci: run `quinn-udp` fast-data-path tests
thomaseizinger Apr 15, 2025
19a625d
fix(quinn-udp): move cmsg-len check to Iterator
thomaseizinger Apr 15, 2025
37beebf
docs(quinn): Copy edit poll_read(_buf?) docs
gretchenfrage Feb 23, 2025
b406b98
build(deps): bump rand from 0.9.0 to 0.9.1
dependabot[bot] Apr 21, 2025
8936cc0
Bump the quinn-proto version to 0.11.11 for release
faern Apr 16, 2025
76b8916
fix(udp): zero control message array on fast-apple-datapath
mxinden Apr 29, 2025
458295c
chore(udp): increase crate patch version to v0.5.12
mxinden Apr 29, 2025
6b901a3
quinn-udp: sanitise `segment_size`
thomaseizinger Apr 30, 2025
0b5762e
Add TokenMemoryCache
gretchenfrage Jan 26, 2025
8cc68dc
Make TokenMemoryCache the default TokenStore
gretchenfrage Jan 26, 2025
1126591
test(proto): Use default TokenMemoryCache
gretchenfrage Jan 26, 2025
15103ee
Add BloomTokenLog
gretchenfrage Jan 26, 2025
a615d43
Make BloomTokenLog the default TokenLog
gretchenfrage Jan 26, 2025
63737c4
Set default tokens sent to 2 if bloom enabled
gretchenfrage Jan 26, 2025
7ce43e8
test(proto): Use default BloomTokenLog
gretchenfrage Jan 26, 2025
d161fc0
Bump quinn version to 0.11.8
dlon May 8, 2025
3482fcc
proto: bump version to 0.11.12
djc May 8, 2025
14b905a
quinn: Fix feature combination error / warnings
gretchenfrage May 8, 2025
f642fa8
ci: Change powerset check
gretchenfrage May 8, 2025
bce3284
quinn: Remove explicit write future structs
gretchenfrage May 10, 2025
c53d990
adjust timers to keep track of the path_id (#60)
divagant-martian May 12, 2025
d056825
WIP: Send on multiple paths
flub Apr 16, 2025
722047b
Something that starts to work
flub May 7, 2025
2a01ddc
Check the 3rd space too, this is very hacky
flub May 8, 2025
135aaf0
Better next space check, only check congestion for new dgram
flub May 9, 2025
2564581
Always call maybe_queue_probe
flub May 11, 2025
8ba7262
clippy
flub May 12, 2025
a90eafd
bump sccache to stop using deprecated github cache servers
flub May 12, 2025
bbbc0cb
fixup docs
flub May 12, 2025
ad6a630
Basic send on multiple paths (#58)
flub May 12, 2025
806858c
Rename PathMigrationData
flub May 12, 2025
9ea74f1
Rename PathMigrationData (#61)
flub May 12, 2025
9f008ad
proto: Make BytesSource private
gretchenfrage May 10, 2025
f1fe183
feat: Make the future returned from SendStream::stopped 'static
Frando May 12, 2025
d06319b
Solaris CI: workaround for spurious network issues
psumbera May 12, 2025
81282af
build(deps): bump getrandom from 0.3.2 to 0.3.3
dependabot[bot] May 12, 2025
176e84c
build(deps): bump rustls-platform-verifier from 0.5.1 to 0.5.3
dependabot[bot] May 12, 2025
4f8a0f1
refactor(quinn): Remove some usage of execute_poll
gretchenfrage May 10, 2025
572baaf
Send most of the stuff only on active paths
flub May 14, 2025
381ba9d
Fix existing tests again
flub May 14, 2025
1e46722
send CONNECTION_CLOSE on all paths, backup or not
flub May 14, 2025
8d52a7b
Don't build all frames on backup paths
flub May 14, 2025
ab977d6
Send most of the stuff only on active paths (#62)
flub May 14, 2025
c8ca79c
proto: Suppress large AcceptError clippy warning
gretchenfrage May 18, 2025
41facf3
Fix large RetryError clippy warnings
gretchenfrage May 18, 2025
a5502f5
keep track of the local and remote max path id (#63)
divagant-martian May 19, 2025
8537a18
Solaris CI: better workaround for spurious network issues
psumbera May 15, 2025
a03ea32
add adapted cid rotation test (#65)
divagant-martian May 20, 2025
d8fdaea
Make sending ACKs work
flub May 22, 2025
2d54bac
Merge branch 'main' into multipath-quinn-0.11.x
flub May 22, 2025
3360856
convert to our test changes
flub May 22, 2025
ffeecca
update ci
flub May 22, 2025
8c4e5d7
Flub/merge main (#68)
flub May 22, 2025
020e6f9
Small cleanup in discard_space
flub May 22, 2025
c9c2646
Small cleanup in discard_space (#69)
flub May 22, 2025
ff5e96b
Fix the LossDetection timer for multipath
flub May 23, 2025
1982b6c
delete repo level project tracking
Arqu May 26, 2025
12218f9
fix(ci): delete repo level project tracking (#72)
flub May 26, 2025
3507bee
simplify Timer::PushNewCid (#71)
divagant-martian May 27, 2025
e8a83c4
fix(quinn-proto): improve per path logic in poll_transmit
dignifiedquire May 28, 2025
4fad7bb
refactor: improve path ack handling
dignifiedquire May 28, 2025
19a0a6c
Use a per-path loss timer
flub May 28, 2025
80405fb
Merge branch 'multipath-quinn-0.11.x' into flub/loss-timer
flub May 28, 2025
efc17ca
Remove obsolete comment
flub May 28, 2025
f6e4853
fix merge
flub May 28, 2025
339b6cf
fix(quinn-proto): correctly associate ACKs to paths (#79)
dignifiedquire May 28, 2025
3fb7df3
Fix the LossDetection timer for multipath (#70)
flub May 28, 2025
1ccc1dc
feat(quinn-proto): validate paths_blocked and path_cids_blocked frames
dignifiedquire May 28, 2025
96e05be
Keep per-path PathStats
flub May 28, 2025
54df081
Keep per-path PathStats (#80)
flub May 28, 2025
63d254b
feat(quinn-proto): handle receiving of path availability frames (#77)
dignifiedquire May 28, 2025
36b0493
update config api to set concurrent open paths (#82)
divagant-martian May 29, 2025
e9e94af
feat: initial setup for high level open path api (#81)
dignifiedquire May 29, 2025
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/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[target.wasm32-unknown-unknown]
runner = "wasm-bindgen-test-runner"
rustflags = ["--cfg", 'getrandom_backend="wasm_js"']
16 changes: 15 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- shell: bash
# Run llvm-cov _without_ the "aws-lc-rs-fips" or "rustls-aws-lc-rs-fips" features, since
# they have complex build requirements:
# https://github.com/aws/aws-lc/blob/3263ce2a553e4e917217fb487f8c6f488fcb1866/BUILDING.md#build-prerequisites
#
# This list of features was determined using:
# cargo metadata --format-version 1 --no-deps \
# | jq -r ' .packages[].features | keys[]' \
# | sort -u \
# | grep -vFx -e 'default' -e 'aws-lc-rs-fips' -e 'rustls-aws-lc-rs-fips' \
# | paste -sd ',' -
run: |
cargo llvm-cov \
--features="arbitrary,async-io,async-std,aws-lc-rs,bloom,direct-log,fast-apple-datapath,futures-io,json-output,lock_tracking,log,platform-verifier,ring,runtime-async-std,runtime-smol,runtime-tokio,rustls,rustls-aws-lc-rs,rustls-log,rustls-ring,serde,serde_json,smol,tracing" \
--workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/project.yaml

This file was deleted.

281 changes: 147 additions & 134 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,97 +6,99 @@ on:
pull_request:

jobs:
test-freebsd:
# see https://github.com/actions/runner/issues/385
# use https://github.com/vmactions/freebsd-vm for now
name: test on freebsd
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test on freebsd
uses: vmactions/freebsd-vm@v1
with:
usesh: true
mem: 4096
copyback: false
prepare: |
pkg install -y curl
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
run: |
export PATH="$HOME/.cargo/bin:$PATH"
echo "===== rustc --version ====="
rustc --version
echo "===== freebsd-version ====="
freebsd-version

cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches

test-netbsd:
name: test on netbsd
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test on netbsd
uses: vmactions/netbsd-vm@v1
with:
usesh: true
mem: 4096
copyback: false
prepare: |
export PATH="/usr/sbin:/sbin:$PATH"
pkg_add curl
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
run: |
export PATH="$HOME/.cargo/bin:$PATH"
echo "===== rustc --version ====="
rustc --version
echo "===== uname -a ====="
uname -a

cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches

test-solaris:
name: test on solaris
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test on Solaris
uses: vmactions/solaris-vm@v1
with:
release: "11.4-gcc"
usesh: true
mem: 4096
copyback: false
prepare: |
source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ Solaris-version ~~~~"
uname -a
# Unlike others, don't un-ignore stress tests, because they hang on Solaris
run: |
export PATH=$HOME/.rust_solaris/bin:$PATH
cargo build --all-targets && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches

test-illumos:
name: test on illumos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test on Illumos
uses: vmactions/omnios-vm@v1
with:
usesh: true
mem: 4096
copyback: false
prepare: |
pkg install gcc14 curl pkg-config glib2
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
run: |
. "$HOME/.cargo/env"
cargo build --all-targets && cargo test && cargo test -- --ignored stress && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p iroh-quinn-udp --benches
# test-freebsd:
# # see https://github.com/actions/runner/issues/385
# # use https://github.com/vmactions/freebsd-vm for now
# name: test on freebsd
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: test on freebsd
# uses: vmactions/freebsd-vm@v1
# with:
# usesh: true
# mem: 4096
# copyback: false
# prepare: |
# pkg install -y curl
# curl https://sh.rustup.rs -sSf --output rustup.sh
# sh rustup.sh -y --profile minimal --default-toolchain stable
# run: |
# export PATH="$HOME/.cargo/bin:$PATH"
# echo "===== rustc --version ====="
# rustc --version
# echo "===== freebsd-version ====="
# freebsd-version

# cargo build --locked --all-targets && cargo test --locked && cargo test --locked -- --ignored stress && cargo test --locked --manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches

# test-netbsd:
# name: test on netbsd
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: test on netbsd
# uses: vmactions/netbsd-vm@v1
# with:
# usesh: true
# mem: 4096
# copyback: false
# prepare: |
# export PATH="/usr/sbin:/sbin:$PATH"
# pkg_add curl
# curl https://sh.rustup.rs -sSf --output rustup.sh
# sh rustup.sh -y --profile minimal --default-toolchain stable
# run: |
# export PATH="$HOME/.cargo/bin:$PATH"
# echo "===== rustc --version ====="
# rustc --version
# echo "===== uname -a ====="
# uname -a

# cargo build --locked --all-targets && cargo test --locked && cargo test --locked -- --ignored stress && cargo test --locked --manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches

# test-solaris:
# name: test on solaris
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: test on Solaris
# uses: vmactions/solaris-vm@v1
# with:
# release: "11.4-gcc"
# usesh: true
# mem: 4096
# copyback: false
# prepare: |
# source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
# echo "~~~~ rustc --version ~~~~"
# rustc --version
# echo "~~~~ Solaris-version ~~~~"
# uname -a
# # Unlike others, don't un-ignore stress tests, because they hang on Solaris
# run: |
# export PATH=$HOME/.rust_solaris/bin:$PATH
# # Workaround for https://github.com/quinn-rs/quinn/issues/2218
# export CARGO_HTTP_MULTIPLEXING=false
# cargo build --locked --all-targets && cargo test --locked --manifest-path fuzz/Cargo.toml && cargo test --locked -p quinn-udp --benches

# test-illumos:
# name: test on illumos
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: test on Illumos
# uses: vmactions/omnios-vm@v1
# with:
# usesh: true
# mem: 4096
# copyback: false
# prepare: |
# pkg install gcc14 curl pkg-config glib2
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
# run: |
# . "$HOME/.cargo/env"
# cargo build --locked --all-targets && cargo test --locked && cargo test --locked -- --ignored stress && cargo test --locked --manifest-path fuzz/Cargo.toml && cargo test --locked -p iroh-quinn-udp --benches

test:
strategy:
Expand All @@ -118,16 +120,21 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected].4
- uses: mozilla-actions/[email protected].9
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo build --all-targets
- run: cargo test
- run: cargo test -- --ignored stress
- run: cargo test --manifest-path fuzz/Cargo.toml
- uses: Swatinem/rust-cache@v2
- run: cargo build --locked --all-targets
- run: cargo test --locked
- run: cargo test --locked -p iroh-quinn-udp --features fast-apple-datapath
if: ${{ runner.os }} == "macOS"
- run: cargo test --locked -- --ignored stress
- run: cargo test --locked --manifest-path fuzz/Cargo.toml
if: ${{ matrix.rust }} == "stable"
- run: cargo test -p iroh-quinn-udp --benches
- run: cargo test --locked -p iroh-quinn-udp --benches
- run: cargo test --locked -p iroh-quinn-udp --benches --features fast-apple-datapath
if: ${{ runner.os }} == "macOS"

test-aws-lc-rs:
runs-on: ubuntu-latest
Expand All @@ -136,50 +143,40 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Prevent feature unification from selecting *ring* as the crypto provider
- run: RUST_BACKTRACE=1 cargo test --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs
- run: RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs,runtime-tokio
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs,runtime-tokio
# FIPS
- run: RUST_BACKTRACE=1 cargo test --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips
- run: RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips,runtime-tokio
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips
- run: RUST_BACKTRACE=1 cargo test --locked --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips,runtime-tokio

wasm_test:
name: test wasm32-unknown-unknown
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Add wasm target
run: rustup target add wasm32-unknown-unknown

- name: Install nodejs v20
uses: actions/setup-node@v4
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: rustup target add wasm32-unknown-unknown
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: bytecodealliance/actions/wasm-tools/setup@v1
- uses: cargo-bins/cargo-binstall@main

- name: Setup `wasm-tools`
uses: bytecodealliance/actions/wasm-tools/setup@v1

- name: Install cargo binstall
uses: cargo-bins/cargo-binstall@main

- name: build wasm32 tests (quinn-proto)
run: cargo test -p iroh-quinn-proto --target wasm32-unknown-unknown --no-run
- run: cargo test --locked -p iroh-quinn-proto --target wasm32-unknown-unknown --no-run
- run: cargo check --locked -p iroh-quinn-udp --target wasm32-unknown-unknown --no-default-features --features=tracing,log
- run: cargo rustc --locked -p iroh-quinn --target wasm32-unknown-unknown --no-default-features --features=log,platform-verifier,rustls-ring --crate-type=cdylib

# If the Wasm file contains any 'import "env"' declarations, then
# some non-Wasm-compatible code made it into the final code.
- name: Check for 'import "env"' in Wasm
- name: Ensure no 'import "env"' in quinn_proto Wasm
run: |
! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/deps/iroh_quinn_proto-*.wasm | grep 'import "env"'

- name: Install wasm-bindgen-test-runner
run: cargo binstall wasm-bindgen-cli --locked --no-confirm
! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/deps/quinn_proto-*.wasm | grep 'import "env"'
- name: Ensure no 'import "env"' in quinn Wasm
run: |
! wasm-tools print --skeleton target/wasm32-unknown-unknown/debug/quinn.wasm | grep 'import "env"'

- name: wasm32 test (quinn-proto)
run: cargo test -p iroh-quinn-proto --target wasm32-unknown-unknown
- run: cargo binstall wasm-bindgen-cli --locked --no-confirm
- run: cargo test --locked -p iroh-quinn-proto --target wasm32-unknown-unknown

msrv:
runs-on: ubuntu-latest
Expand All @@ -188,9 +185,10 @@ jobs:
SCCACHE_GHA_ENABLED: "on"
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected].4
- uses: mozilla-actions/[email protected].9
- uses: dtolnay/[email protected]
- run: cargo check --lib --all-features -p iroh-quinn-udp -p iroh-quinn-proto -p iroh-quinn
- uses: Swatinem/rust-cache@v2
- run: cargo check --locked --lib --all-features -p iroh-quinn-udp -p iroh-quinn-proto -p iroh-quinn

lint:
runs-on: ubuntu-latest
Expand All @@ -199,24 +197,24 @@ jobs:
SCCACHE_GHA_ENABLED: "on"
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected].4
- uses: mozilla-actions/[email protected].9
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo check --manifest-path quinn/Cargo.toml --all-targets --no-default-features
- run: cargo clippy --all-targets -- -D warnings
- run: cargo check --locked --manifest-path quinn/Cargo.toml --all-targets --no-default-features
- run: cargo clippy --locked --all-targets -- -D warnings
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: doc
run: cargo doc --no-deps --document-private-items
run: cargo doc --locked --no-deps --document-private-items
env:
RUSTDOCFLAGS: -Dwarnings
- name: lint fuzz
run: |
cd fuzz
cargo clippy -- -D warnings
cargo clippy --locked -- -D warnings

audit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -285,3 +283,18 @@ jobs:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.emulator-arch }}
script: .github/workflows/rust-android-run-tests-on-emulator.sh

# features:
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# runs-on: ${{ matrix.os }}
# env:
# RUSTFLAGS: -Dwarnings
# # skip FIPS features outside of Linux
# SKIP_FEATURES: ${{ matrix.os != 'ubuntu-latest' && 'rustls-aws-lc-rs-fips,aws-lc-rs-fips' || '' }}
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# - uses: taiki-e/install-action@cargo-hack
# - run: cargo hack check --feature-powerset --depth 3 --optional-deps --no-dev-deps --ignore-private --skip "${{env.SKIP_FEATURES}}"
Loading