Skip to content

update workspace, Rust edition 2024, fixes #267

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

Merged
merged 15 commits into from
Jun 1, 2025
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ indent_size = 4
trim_trailing_whitespace = true
max_line_length = 80

[{*.nix,*.yml}]
[{*.md,*.nix,*.toml,*.yml}]
indent_size = 2
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use nix
use flake
7 changes: 3 additions & 4 deletions .github/workflows/_build-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ jobs:
run: |
rustup component add miri
# Run with stack-borrow model
# XXX Temporarily, just for multiboot2 crate.
cargo miri test -p multiboot2
cargo miri test
# Run with tree-borrow model
# XXX Temporarily, just for multiboot2 crate.
MIRIFLAGS=-Zmiri-tree-borrows cargo +nightly miri test -p multiboot2
# TODO currently doesn't work with the ELF section parsing code
# MIRIFLAGS="-Zmiri-tree-borrows" cargo +nightly miri test
12 changes: 3 additions & 9 deletions .github/workflows/integrationtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
# This channel is only required to invoke "nix-shell".
# Everything inside that nix-shell will use a pinned version of
# nixpkgs.
nix_path: nixpkgs=channel:nixos-23.11
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: cachix/install-nix-action@v31
- name: Set up cargo cache
uses: actions/cache@v4
continue-on-error: false
Expand All @@ -48,6 +42,6 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('integration-test/**/Cargo.toml', 'integration-test/**/Cargo.lock', 'integration-test/bins/rust-toolchain.toml') }}
# Have all the "copying into Nix store" messages in a dedicated step for
# better log visibility.
- run: nix-shell --run "echo OK"
- run: nix develop --command bash -c "echo OK"
# Now, run the actual test.
- run: nix-shell --run run-integrationtest
- run: nix develop --command bash -c "run-integrationtest"
14 changes: 7 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: build (msrv)
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: 1.75.0 # MSRV
rust-version: 1.85.0 # MSRV
do-style-check: false
features: builder

Expand All @@ -42,15 +42,15 @@ jobs:
with:
rust-version: nightly
do-style-check: false
features: builder,unstable
features: builder

### no-std Build #########################
build_nostd_msrv:
name: build no_std (msrv)
needs: build_msrv
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: 1.75.0 # MSRV
rust-version: 1.85.0 # MSRV
do-style-check: false
rust-target: thumbv7em-none-eabihf
features: builder
Expand Down Expand Up @@ -99,15 +99,15 @@ jobs:
rust-version: nightly
do-style-check: false
rust-target: thumbv7em-none-eabihf
features: builder,unstable
features: builder

### Style Checks + Doc #####################
style_msrv:
name: style (msrv)
needs: build_msrv
uses: ./.github/workflows/_build-rust.yml
with:
rust-version: 1.75.0 # MSRV
rust-version: 1.85.0 # MSRV
do-style-check: true
do-test: false
features: builder
Expand All @@ -130,7 +130,7 @@ jobs:
rust-version: nightly
do-style-check: true
do-test: false
features: builder,unstable
features: builder

miri:
name: tests with miri (nightly)
Expand All @@ -141,4 +141,4 @@ jobs:
do-style-check: false
do-test: false
do-miri: true
features: builder,unstable
features: builder
113 changes: 63 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
[workspace]
resolver = "2"
members = [
"multiboot2",
"multiboot2-common",
"multiboot2-header",
"multiboot2",
"multiboot2-common",
"multiboot2-header",
]
exclude = [
"integration-test"
"integration-test"
]
package.rust-version = "1.85.0"
package.edition = "2024"
package.license = "MIT/Apache-2.0"

[workspace.dependencies]
bitflags = "2.9.0"
derive_more = { version = "1.0.0", default-features = false, features = ["display"] }
bitflags = "2.9.1"
log = { version = "~0.4", default-features = false }
ptr_meta = { version = "~0.3", default-features = false, features = ["derive"] }
thiserror = { version = "2.0.12", default-features = false }

# Intra-workspace dependencies of upstream crates: always point to the latest
# stable version
multiboot2 = { version = "0.23.1", default-features = false }
multiboot2-common = { version = "0.2.1", default-features = false }
# Warn: 0.3 has multiple very breaking changes
ptr_meta = { version = "~0.2", default-features = false }

# This way, the corresponding crate dependency can be normalley referenced by
# version, while still the repository version is used transparently during local
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading