Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,27 @@ jobs:
id: definitions
run: |
rustup show active-toolchain
export MSRV=$(rustup show active-toolchain | awk -F'-' '{print $1}')
# The MSRV is declared by the `rust-version` field of each crate. It is
# deliberately not tied to the toolchain anyone happens to be building
# with; jobs that need a specific toolchain install and override it
# themselves.
export MSRV=$(grep -m1 '^rust-version' quic/s2n-quic/Cargo.toml | sed -E 's/^rust-version *= *"(.+)"/\1/')
if [ -z "$MSRV" ]; then
echo "Error: MSRV did not parse correctly"
exit 1
fi
# The MSRV above is the floor s2n-quic promises to its users, so no
# crate may declare a lower `rust-version` than it. A crate requiring a
# higher one is allowed: the xdp and wireshark workspaces have needed
# that in the past when their dependencies outpaced the repository
# MSRV. Nothing pins these together anymore, so check it explicitly
# rather than silently testing a version some crate does not support.
export LOWEST=$(git ls-files '*Cargo.toml' | xargs grep -h '^rust-version' | sed -E 's/^rust-version *= *"(.+)"/\1/' | sort -V | head -1)
if [ "$LOWEST" != "$MSRV" ]; then
echo "Error: a crate declares rust-version $LOWEST, below the $MSRV MSRV of s2n-quic"
git ls-files '*Cargo.toml' | xargs grep -H '^rust-version' | sort -u
exit 1
fi
echo "msrv=$MSRV"
echo "msrv=$MSRV" >> $GITHUB_OUTPUT
export RAW_VERSIONS="stable beta $MSRV"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ jobs:
with:
submodules: true

- name: "Remove rust-toolchain"
run: rm rust-toolchain

- uses: EmbarkStudios/cargo-deny-action@v2
with:
arguments: --all-features --config .github/config/cargo-deny.toml
Expand Down
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ GitHub provides additional document on [forking a repository](https://help.githu
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).


## Development toolchain

`s2n-quic` is developed against a recent stable Rust toolchain, along with the `clippy` and `rustfmt` components:

```
rustup toolchain install stable --component clippy,rustfmt
```

This is separate from the minimum supported Rust version. The MSRV is declared by the `rust-version` field of each crate and is verified in CI, so there is no need to develop against it directly. Clippy is configured with the MSRV through the `msrv` key in `.clippy.toml`, which reports uses of standard library APIs that are newer than the MSRV allows.

Building the eBPF programs under `tools/xdp/ebpf` requires the nightly toolchain pinned by `tools/xdp/ebpf/rust-toolchain.toml`, which `cargo xtask` selects automatically.

## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.

Expand Down
3 changes: 0 additions & 3 deletions dc/wireshark/rust-toolchain

This file was deleted.

3 changes: 0 additions & 3 deletions rust-toolchain

This file was deleted.

3 changes: 0 additions & 3 deletions tools/xdp/rust-toolchain

This file was deleted.

Loading