Skip to content

Commit 6e009a8

Browse files
feat!: bump MSRV to 1.81 (#3033)
## Description Bumps the MSRV from `1.76` to `1.81` Closes #3031 ## Breaking Changes - MSRV changed ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
1 parent cf0f8cc commit 6e009a8

File tree

12 files changed

+40
-41
lines changed

12 files changed

+40
-41
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
RUST_BACKTRACE: 1
1717
RUSTFLAGS: -Dwarnings
1818
RUSTDOCFLAGS: -Dwarnings
19-
MSRV: "1.76"
19+
MSRV: "1.81"
2020
SCCACHE_CACHE_SIZE: "10G"
2121
IROH_FORCE_STAGING_RELAYS: "1"
2222

@@ -221,7 +221,7 @@ jobs:
221221
- uses: actions/checkout@v4
222222
- uses: dtolnay/rust-toolchain@master
223223
with:
224-
toolchain: nightly-2024-05-02
224+
toolchain: nightly-2024-11-30
225225
- name: Install sccache
226226
uses: mozilla-actions/[email protected]
227227

.github/workflows/docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- uses: dtolnay/rust-toolchain@master
3434
with:
35-
toolchain: nightly-2024-05-02
35+
toolchain: nightly-2024-11-30
3636
- name: Install sccache
3737
uses: mozilla-actions/[email protected]
3838

@@ -68,6 +68,6 @@ jobs:
6868
comment-id: ${{ steps.fc.outputs.comment-id }}
6969
body: |
7070
Documentation for this PR has been generated and is available at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ env.PREVIEW_PATH }}/iroh/
71-
71+
7272
Last updated: ${{ env.TIMESTAMP }}
7373
edit-mode: replace

.github/workflows/release.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ env:
4040
RUST_BACKTRACE: 1
4141
RUSTFLAGS: -Dwarnings
4242
RUSTDOCFLAGS: -Dwarnings
43-
MSRV: "1.76"
43+
MSRV: "1.81"
4444
SCCACHE_CACHE_SIZE: "10G"
4545
BIN_NAMES: "iroh-relay,iroh-dns-server"
4646
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
@@ -138,19 +138,19 @@ jobs:
138138
uses: actions/checkout@v4
139139
with:
140140
submodules: recursive
141-
141+
142142
- name: Checkout specified commit
143143
if: inputs.base_hash != ''
144144
uses: actions/checkout@v4
145145
with:
146146
ref: ${{ inputs.base_hash }}
147147
submodules: recursive
148-
148+
149149
- name: Set build arch
150150
run: |
151151
echo "RELEASE_ARCH=${{ matrix.release-arch }}" >> $GITHUB_ENV
152152
echo "RELEASE_OS=${{ matrix.release-os }}" >> $GITHUB_ENV
153-
153+
154154
- name: Define hash
155155
if: matrix.os == 'ubuntu-latest'
156156
id: define_hash
@@ -160,7 +160,7 @@ jobs:
160160
- name: Ensure musl support
161161
if: ${{ contains(matrix.cargo_targets, '-musl') }}
162162
run: sudo apt-get install musl-tools -y
163-
163+
164164
- name: Install Rust
165165
if: matrix.os != 'windows-latest'
166166
uses: dtolnay/rust-toolchain@stable
@@ -173,7 +173,7 @@ jobs:
173173
run: |
174174
rustup toolchain install stable
175175
rustup target add ${{ matrix.cargo_targets }}
176-
176+
177177
- name: build release
178178
if: matrix.os != 'windows-latest'
179179
shell: bash
@@ -183,60 +183,60 @@ jobs:
183183
export CC=aarch64-linux-gnu-gcc
184184
fi
185185
cargo build --profile optimized-release --all-features --target ${{ matrix.cargo_targets }}
186-
186+
187187
- name: build release
188188
if: matrix.os == 'windows-latest'
189189
run: cargo build --profile optimized-release --all-features --target ${{ matrix.cargo_targets }}
190-
190+
191191
- name: attach artifacts
192192
if: matrix.os != 'windows-latest'
193193
uses: actions/upload-artifact@v4
194194
with:
195195
name: iroh-${{env.RELEASE_OS }}-${{env.RELEASE_ARCH}}
196196
path: target/${{ matrix.cargo_targets }}/optimized-release/iroh
197197
compression-level: 0
198-
198+
199199
- name: attach artifacts
200200
if: matrix.os == 'windows-latest'
201201
uses: actions/upload-artifact@v4
202202
with:
203203
name: iroh-windows-amd64.exe
204204
path: target/${{ matrix.cargo_targets }}/optimized-release/iroh.exe
205205
compression-level: 0
206-
206+
207207
- name: Setup awscli on linux
208208
if: matrix.name == 'ubuntu-latest'
209209
run: |
210210
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
211211
unzip awscliv2.zip
212212
sudo ./aws/install --update
213-
213+
214214
- name: Setup awscli on linux
215215
if: matrix.name == 'ubuntu-arm-latest'
216216
run: |
217217
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
218218
unzip awscliv2.zip
219219
sudo ./aws/install --update
220-
220+
221221
- name: Setup awscli on mac
222222
if: matrix.os == 'macos-latest'
223223
run: |
224224
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
225225
sudo installer -pkg AWSCLIV2.pkg -target /
226-
226+
227227
- name: Set aws credentials
228228
if: matrix.os != 'windows-latest'
229229
run: |
230230
echo "AWS_ACCESS_KEY_ID=${{secrets.S3_ACCESS_KEY_ID}}" >> $GITHUB_ENV
231231
echo "AWS_SECRET_ACCESS_KEY=${{secrets.S3_ACCESS_KEY}}" >> $GITHUB_ENV
232232
echo "AWS_DEFAULT_REGION=us-west-2" >> $GITHUB_ENV
233-
233+
234234
- name: push release
235235
if: matrix.os != 'windows-latest'
236236
run: |
237237
aws s3 cp ./target/${{ matrix.cargo_targets }}/optimized-release/iroh-relay s3://vorc/iroh-relay-${RELEASE_OS}-${RELEASE_ARCH}-${GITHUB_SHA::7} --no-progress
238238
aws s3 cp ./target/${{ matrix.cargo_targets }}/optimized-release/iroh-dns-server s3://vorc/iroh-dns-server-${RELEASE_OS}-${RELEASE_ARCH}-${GITHUB_SHA::7} --no-progress
239-
239+
240240
- name: push release latest
241241
if: matrix.os != 'windows-latest' && (github.event.inputs.mark_latest == 'true' || github.event_name == 'push')
242242
run: |
@@ -290,7 +290,7 @@ jobs:
290290
path: iroh-*.tar.gz
291291
compression-level: 0
292292
retention-days: 1
293-
293+
294294
- name: attach artifacts
295295
uses: actions/upload-artifact@v4
296296
if : matrix.os == 'windows-latest'
@@ -307,4 +307,4 @@ jobs:
307307
with:
308308
release_version: ${{ needs.build_release.outputs.release_version }}
309309
base_hash: ${{ needs.build_release.outputs.base_hash }}
310-
publish: true
310+
publish: true

.github/workflows/test_relay_server.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ on:
88
concurrency:
99
group: relay-${{ github.workflow }}-${{ github.ref }}
1010
cancel-in-progress: true
11-
11+
1212
env:
1313
RUST_BACKTRACE: 1
1414
RUSTFLAGS: -Dwarnings
1515
RUSTDOCFLAGS: -Dwarnings
16-
MSRV: "1.76"
16+
MSRV: "1.81"
1717
SCCACHE_CACHE_SIZE: "10G"
1818
IROH_FORCE_STAGING_RELAYS: "1"
19-
19+
2020
jobs:
2121
build_relay_server:
2222
runs-on: [self-hosted, linux, X64]
@@ -33,11 +33,11 @@ jobs:
3333
uses: dtolnay/rust-toolchain@stable
3434
- name: Install sccache
3535
uses: mozilla-actions/[email protected]
36-
36+
3737
- name: build release
3838
run: |
3939
cargo build --release --all-features --bin iroh-relay
40-
40+
4141
- name: Setup awscli on linux
4242
run: |
4343
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
@@ -48,16 +48,16 @@ jobs:
4848
echo "AWS_ACCESS_KEY_ID=${{secrets.S3_ACCESS_KEY_ID}}" >> $GITHUB_ENV
4949
echo "AWS_SECRET_ACCESS_KEY=${{secrets.S3_ACCESS_KEY}}" >> $GITHUB_ENV
5050
echo "AWS_DEFAULT_REGION=us-west-2" >> $GITHUB_ENV
51-
51+
5252
- name: push release
5353
run: |
5454
aws s3 cp ./target/release/iroh-relay s3://vorc/iroh-relay-linux-amd64-${GITHUB_SHA::7} --no-progress
55-
55+
5656
- name: Set iroh-relay tag
5757
id: set_tag
5858
run: |
5959
echo ::set-output name=tag::${GITHUB_SHA::7}
60-
60+
6161
6262
deploy_iroh-relay:
6363
runs-on: ubuntu-latest

iroh-base/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = ["n0 team"]
99
repository = "https://github.com/n0-computer/iroh"
1010

1111
# Sadly this also needs to be updated in .github/workflows/ci.yml
12-
rust-version = "1.76"
12+
rust-version = "1.81"
1313

1414
[lints]
1515
workspace = true

iroh-net-report/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repository = "https://github.com/n0-computer/iroh"
1010
keywords = ["networking"]
1111

1212
# Sadly this also needs to be updated in .github/workflows/ci.yml
13-
rust-version = "1.76"
13+
rust-version = "1.81"
1414

1515
[lints]
1616
workspace = true

iroh-relay/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
88
authors = ["n0 team"]
99
repository = "https://github.com/n0-computer/iroh"
1010
keywords = ["networking", "holepunching", "p2p"]
11-
rust-version = "1.76"
11+
rust-version = "1.81"
1212

1313
[lints]
1414
workspace = true

iroh-relay/src/protos/disco.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
/// The 6 byte header of all discovery messages.
88
pub const MAGIC: &str = "TS💬"; // 6 bytes: 0x54 53 f0 9f 92 ac
9-
pub(crate) const MAGIC_LEN: usize = MAGIC.as_bytes().len();
9+
pub(crate) const MAGIC_LEN: usize = MAGIC.len();
1010
pub(crate) const KEY_LEN: usize = 32;
1111

1212
const MESSAGE_HEADER_LEN: usize = MAGIC_LEN + KEY_LEN;

iroh-relay/src/protos/relay.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl Frame {
268268
client_public_key: _,
269269
message,
270270
signature: _,
271-
} => MAGIC.as_bytes().len() + PUBLIC_KEY_LENGTH + message.len() + Signature::BYTE_SIZE,
271+
} => MAGIC.len() + PUBLIC_KEY_LENGTH + message.len() + Signature::BYTE_SIZE,
272272
Frame::SendPacket { dst_key: _, packet } => PUBLIC_KEY_LENGTH + packet.len(),
273273
Frame::RecvPacket {
274274
src_key: _,
@@ -368,17 +368,16 @@ impl Frame {
368368
let res = match frame_type {
369369
FrameType::ClientInfo => {
370370
ensure!(
371-
content.len()
372-
>= PUBLIC_KEY_LENGTH + Signature::BYTE_SIZE + MAGIC.as_bytes().len(),
371+
content.len() >= PUBLIC_KEY_LENGTH + Signature::BYTE_SIZE + MAGIC.len(),
373372
"invalid client info frame length: {}",
374373
content.len()
375374
);
376375
ensure!(
377-
&content[..MAGIC.as_bytes().len()] == MAGIC.as_bytes(),
376+
&content[..MAGIC.len()] == MAGIC.as_bytes(),
378377
"invalid client info frame magic"
379378
);
380379

381-
let start = MAGIC.as_bytes().len();
380+
let start = MAGIC.len();
382381
let client_public_key =
383382
PublicKey::try_from(&content[start..start + PUBLIC_KEY_LENGTH])?;
384383
let start = start + PUBLIC_KEY_LENGTH;

iroh-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repository = "https://github.com/n0-computer/iroh"
1010
publish = true
1111

1212
# Sadly this also needs to be updated in .github/workflows/ci.yml
13-
rust-version = "1.76"
13+
rust-version = "1.81"
1414

1515
[lints]
1616
workspace = true

iroh/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repository = "https://github.com/n0-computer/iroh"
1010
keywords = ["quic", "networking", "holepunching", "p2p"]
1111

1212
# Sadly this also needs to be updated in .github/workflows/ci.yml
13-
rust-version = "1.76"
13+
rust-version = "1.81"
1414

1515
[lints]
1616
workspace = true

iroh/src/disco.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use crate::key;
3434
// TODO: custom magicn
3535
/// The 6 byte header of all discovery messages.
3636
pub const MAGIC: &str = "TS💬"; // 6 bytes: 0x54 53 f0 9f 92 ac
37-
pub const MAGIC_LEN: usize = MAGIC.as_bytes().len();
37+
pub const MAGIC_LEN: usize = MAGIC.len();
3838

3939
/// Current Version.
4040
const V0: u8 = 0;

0 commit comments

Comments
 (0)