Skip to content

Commit

Permalink
Merge branch 'main' into matheus23/quinn-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 authored Dec 10, 2024
2 parents 055e42a + 204b147 commit 38cec54
Show file tree
Hide file tree
Showing 38 changed files with 1,340 additions and 859 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @djc @Ralith
/quinn-udp @djc @Ralith @mxinden
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: taiki-e/install-action@cargo-llvm-cov
- run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
Expand Down
90 changes: 80 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,80 @@ jobs:
pkg install -y curl
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
echo "~~~~ rustc --version ~~~~"
$HOME/.cargo/bin/rustc --version
echo "~~~~ freebsd-version ~~~~"
run: |
export PATH="$HOME/.cargo/bin:$PATH"
echo "===== rustc --version ====="
rustc --version
echo "===== freebsd-version ====="
freebsd-version
run: $HOME/.cargo/bin/cargo build --all-targets && $HOME/.cargo/bin/cargo test && $HOME/.cargo/bin/cargo test --manifest-path fuzz/Cargo.toml && $HOME/.cargo/bin/cargo test -p quinn-udp --benches
cargo build --all-targets && cargo test && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p 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 --manifest-path fuzz/Cargo.toml && cargo test -p 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
run: |
export PATH=$HOME/.rust_solaris/bin:$PATH
cargo build --all-targets && cargo test && cargo test --manifest-path fuzz/Cargo.toml && cargo test -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 --all-targets && cargo test && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches
test:
strategy:
matrix:
Expand Down Expand Up @@ -82,10 +151,11 @@ jobs:
- uses: bytecodealliance/actions/wasm-tools/setup@v1
- uses: cargo-bins/cargo-binstall@main

# We need to downgrade cc to version 1.1.31 for ring Wasm compilation to work.
# See the upstream issue https://github.com/rust-lang/cc-rs/issues/1275
- name: Downgrade `cc` to version 1.1.31
run: cargo update -p cc --precise 1.1.31
- name: Setup `wasm-tools`
uses: bytecodealliance/actions/wasm-tools/setup@v1

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

- run: cargo test -p quinn-proto --target wasm32-unknown-unknown --no-run
- run: cargo check -p quinn-udp --target wasm32-unknown-unknown --no-default-features --features=tracing,log
Expand All @@ -107,7 +177,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.70.0
# Note that we must also update the README when changing the MSRV
- uses: dtolnay/rust-toolchain@1.71.0
- uses: Swatinem/rust-cache@v2
- run: cargo check --lib --all-features -p quinn-udp -p quinn-proto -p quinn

Expand Down Expand Up @@ -214,4 +285,3 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- run: cargo hack check --feature-powerset --optional-deps --no-dev-deps --ignore-unknown-features --ignore-private --group-features runtime-async-std,async-io,async-std --group-features runtime-smol,async-io,smol --skip "${{env.SKIP_FEATURES}}"

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default-members = ["quinn", "quinn-proto", "quinn-udp", "bench", "perf"]
resolver = "2"

[workspace.package]
rust-version = "1.70.0"
rust-version = "1.71"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/quinn-rs/quinn"
Expand Down Expand Up @@ -53,7 +53,7 @@ tracing-subscriber = { version = "0.3.0", default-features = false, features = [
url = "2"
wasm-bindgen-test = { version = "0.3.45" }
web-time = "1"
windows-sys = { version = ">=0.52, <=0.59", features = ["Win32_Foundation", "Win32_System_IO", "Win32_Networking_WinSock"] }
windows-sys = { version = ">=0.52, <=0.59", features = ["Win32_Foundation", "Win32_System_IO", "Win32_Networking_WinSock", "Win32_System_SystemInformation", "Win32_System_Threading"] }

[profile.bench]
debug = true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The project was founded by [Dirkjan Ochtman](https://github.com/djc) and
[rustls][rustls] and [*ring*][ring]
- Application-layer datagrams for small, unreliable messages
- Future-based async API
- Minimum supported Rust version of 1.66
- Minimum supported Rust version of 1.71

## Overview

Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ allow = [
"MIT",
"MPL-2.0",
"OpenSSL",
"Unicode-DFS-2016",
"Unicode-3.0",
]
private = { ignore = true }

Expand Down
2 changes: 1 addition & 1 deletion perf/src/bin/perf_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ async fn request(

let send_stream_stats = stream_stats.new_sender(&send, upload);

const DATA: [u8; 1024 * 1024] = [42; 1024 * 1024];
static DATA: [u8; 1024 * 1024] = [42; 1024 * 1024];
while upload > 0 {
let chunk_len = upload.min(DATA.len() as u64);
send.write_chunk(Bytes::from_static(&DATA[..chunk_len as usize]))
Expand Down
2 changes: 1 addition & 1 deletion perf/src/bin/perf_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async fn drain_stream(mut stream: quinn::RecvStream) -> Result<()> {
}

async fn respond(mut bytes: u64, mut stream: quinn::SendStream) -> Result<()> {
const DATA: [u8; 1024 * 1024] = [42; 1024 * 1024];
static DATA: [u8; 1024 * 1024] = [42; 1024 * 1024];

while bytes > 0 {
let chunk_len = bytes.min(DATA.len() as u64);
Expand Down
9 changes: 5 additions & 4 deletions quinn-proto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quinn-proto"
version = "0.11.8"
version = "0.11.10"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Expand All @@ -10,9 +10,6 @@ keywords.workspace = true
categories.workspace = true
workspace = ".."

[package.metadata.docs.rs]
all-features = true

[features]
default = ["rustls-ring", "log"]
aws-lc-rs = ["dep:aws-lc-rs", "aws-lc-rs?/aws-lc-sys", "aws-lc-rs?/prebuilt-nasm"]
Expand Down Expand Up @@ -66,3 +63,7 @@ wasm-bindgen-test = { workspace = true }
[lints.rust]
# https://rust-fuzz.github.io/book/cargo-fuzz/guide.html#cfgfuzzing
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }

[package.metadata.docs.rs]
# all non-default features except fips (cannot build on docs.rs environment)
features = ["rustls-aws-lc-rs", "rustls-ring", "platform-verifier", "log", "rustls-log"]
Loading

0 comments on commit 38cec54

Please sign in to comment.