Skip to content

Commit cc2cbb1

Browse files
authored
Merge pull request #267 from rust-osdev/updates
update workspace, Rust edition 2024, fixes
2 parents 7c3c336 + 3985e47 commit cc2cbb1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+404
-566
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ indent_size = 4
1111
trim_trailing_whitespace = true
1212
max_line_length = 80
1313

14-
[{*.nix,*.yml}]
14+
[{*.md,*.nix,*.toml,*.yml}]
1515
indent_size = 2

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
use nix
1+
use flake

.github/workflows/_build-rust.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ jobs:
102102
run: |
103103
rustup component add miri
104104
# Run with stack-borrow model
105-
# XXX Temporarily, just for multiboot2 crate.
106-
cargo miri test -p multiboot2
105+
cargo miri test
107106
# Run with tree-borrow model
108-
# XXX Temporarily, just for multiboot2 crate.
109-
MIRIFLAGS=-Zmiri-tree-borrows cargo +nightly miri test -p multiboot2
107+
# TODO currently doesn't work with the ELF section parsing code
108+
# MIRIFLAGS="-Zmiri-tree-borrows" cargo +nightly miri test

.github/workflows/integrationtest.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,7 @@ jobs:
2626
steps:
2727
- name: Check out
2828
uses: actions/checkout@v4
29-
- uses: cachix/install-nix-action@v30
30-
with:
31-
# This channel is only required to invoke "nix-shell".
32-
# Everything inside that nix-shell will use a pinned version of
33-
# nixpkgs.
34-
nix_path: nixpkgs=channel:nixos-23.11
35-
- uses: DeterminateSystems/magic-nix-cache-action@main
29+
- uses: cachix/install-nix-action@v31
3630
- name: Set up cargo cache
3731
uses: actions/cache@v4
3832
continue-on-error: false
@@ -48,6 +42,6 @@ jobs:
4842
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('integration-test/**/Cargo.toml', 'integration-test/**/Cargo.lock', 'integration-test/bins/rust-toolchain.toml') }}
4943
# Have all the "copying into Nix store" messages in a dedicated step for
5044
# better log visibility.
51-
- run: nix-shell --run "echo OK"
45+
- run: nix develop --command bash -c "echo OK"
5246
# Now, run the actual test.
53-
- run: nix-shell --run run-integrationtest
47+
- run: nix develop --command bash -c "run-integrationtest"

.github/workflows/rust.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
name: build (msrv)
2525
uses: ./.github/workflows/_build-rust.yml
2626
with:
27-
rust-version: 1.75.0 # MSRV
27+
rust-version: 1.85.0 # MSRV
2828
do-style-check: false
2929
features: builder
3030

@@ -42,15 +42,15 @@ jobs:
4242
with:
4343
rust-version: nightly
4444
do-style-check: false
45-
features: builder,unstable
45+
features: builder
4646

4747
### no-std Build #########################
4848
build_nostd_msrv:
4949
name: build no_std (msrv)
5050
needs: build_msrv
5151
uses: ./.github/workflows/_build-rust.yml
5252
with:
53-
rust-version: 1.75.0 # MSRV
53+
rust-version: 1.85.0 # MSRV
5454
do-style-check: false
5555
rust-target: thumbv7em-none-eabihf
5656
features: builder
@@ -99,15 +99,15 @@ jobs:
9999
rust-version: nightly
100100
do-style-check: false
101101
rust-target: thumbv7em-none-eabihf
102-
features: builder,unstable
102+
features: builder
103103

104104
### Style Checks + Doc #####################
105105
style_msrv:
106106
name: style (msrv)
107107
needs: build_msrv
108108
uses: ./.github/workflows/_build-rust.yml
109109
with:
110-
rust-version: 1.75.0 # MSRV
110+
rust-version: 1.85.0 # MSRV
111111
do-style-check: true
112112
do-test: false
113113
features: builder
@@ -130,7 +130,7 @@ jobs:
130130
rust-version: nightly
131131
do-style-check: true
132132
do-test: false
133-
features: builder,unstable
133+
features: builder
134134

135135
miri:
136136
name: tests with miri (nightly)
@@ -141,4 +141,4 @@ jobs:
141141
do-style-check: false
142142
do-test: false
143143
do-miri: true
144-
features: builder,unstable
144+
features: builder

Cargo.lock

Lines changed: 63 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
[workspace]
22
resolver = "2"
33
members = [
4-
"multiboot2",
5-
"multiboot2-common",
6-
"multiboot2-header",
4+
"multiboot2",
5+
"multiboot2-common",
6+
"multiboot2-header",
77
]
88
exclude = [
9-
"integration-test"
9+
"integration-test"
1010
]
11+
package.rust-version = "1.85.0"
12+
package.edition = "2024"
13+
package.license = "MIT/Apache-2.0"
1114

1215
[workspace.dependencies]
13-
bitflags = "2.9.0"
14-
derive_more = { version = "1.0.0", default-features = false, features = ["display"] }
16+
bitflags = "2.9.1"
1517
log = { version = "~0.4", default-features = false }
18+
ptr_meta = { version = "~0.3", default-features = false, features = ["derive"] }
19+
thiserror = { version = "2.0.12", default-features = false }
20+
21+
# Intra-workspace dependencies of upstream crates: always point to the latest
22+
# stable version
1623
multiboot2 = { version = "0.23.1", default-features = false }
1724
multiboot2-common = { version = "0.2.1", default-features = false }
18-
# Warn: 0.3 has multiple very breaking changes
19-
ptr_meta = { version = "~0.2", default-features = false }
2025

2126
# This way, the corresponding crate dependency can be normalley referenced by
2227
# version, while still the repository version is used transparently during local

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)