Skip to content

Commit

Permalink
Update to the latest nightly Rust. (#249)
Browse files Browse the repository at this point in the history
* Update to the latest nightly Rust.

* Updates for Rust changes.
  • Loading branch information
sunfishcode authored Jan 2, 2025
1 parent 3509621 commit 57f86f3
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 22 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
include:
- build: ubuntu
os: ubuntu-latest
rust: nightly-2024-10-06
rust: nightly-2025-01-02
host_target: x86_64-unknown-linux-gnu
mustang_target: x86_64-mustang-linux-gnu
- build: i686-linux
os: ubuntu-latest
rust: nightly-2024-10-06
rust: nightly-2025-01-02
target: i686-unknown-linux-gnu
gcc_package: gcc-i686-linux-gnu
gcc: i686-linux-gnu-gcc
Expand All @@ -44,7 +44,7 @@ jobs:
mustang_target: i686-mustang-linux-gnu
- build: aarch64-linux
os: ubuntu-latest
rust: nightly-2024-10-06
rust: nightly-2025-01-02
target: aarch64-unknown-linux-gnu
gcc_package: gcc-aarch64-linux-gnu
gcc: aarch64-linux-gnu-gcc
Expand All @@ -54,7 +54,7 @@ jobs:
mustang_target: aarch64-mustang-linux-gnu
- build: riscv64-linux
os: ubuntu-latest
rust: nightly-2024-10-06
rust: nightly-2025-01-02
target: riscv64gc-unknown-linux-gnu
gcc_package: gcc-riscv64-linux-gnu
gcc: riscv64-linux-gnu-gcc
Expand Down Expand Up @@ -138,22 +138,22 @@ jobs:

- name: Install rust-src
run: |
rustup component add rust-src --toolchain nightly-2024-10-06-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2025-01-02-x86_64-unknown-linux-gnu
- name: cargo check non-mustang
run: |
# Check that the code compiles on non-mustang targets.
cargo +nightly-2024-10-06 check --all --target=${{ matrix.host_target }}
cargo +nightly-2025-01-02 check --all --target=${{ matrix.host_target }}
- name: cargo test
run: |
cargo +nightly-2024-10-06 test --verbose -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }} -- --nocapture
cargo +nightly-2025-01-02 test --verbose -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }} -- --nocapture
env:
RUST_BACKTRACE: 1

- name: cargo test --release
run: |
cargo +nightly-2024-10-06 test --verbose --release -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }}
cargo +nightly-2025-01-02 test --verbose --release -Z build-std --target=target-specs/${{ matrix.mustang_target }}.json -- ${{ matrix.test_args }}
env:
RUST_BACKTRACE: 1

Expand Down Expand Up @@ -181,20 +181,20 @@ jobs:
- name: test mustang-nostd as program
working-directory: example-crates/mustang-nostd
run: |
cargo +nightly-2024-10-06 run -Zbuild-std=core,alloc --target=../../target-specs/${{ matrix.mustang_target }}.json
cargo +nightly-2025-01-02 run -Zbuild-std=core,alloc --target=../../target-specs/${{ matrix.mustang_target }}.json
env:
RUST_BACKTRACE: 1

- name: test mustang-nostd as tests
working-directory: example-crates/mustang-nostd
run: |
cargo +nightly-2024-10-06 test -Zbuild-std=core,alloc,test,std --target=../../target-specs/${{ matrix.mustang_target }}.json
cargo +nightly-2025-01-02 test -Zbuild-std=core,alloc,test,std --target=../../target-specs/${{ matrix.mustang_target }}.json
env:
RUST_BACKTRACE: 1

- name: test mustang-custom-allocator as tests
working-directory: example-crates/mustang-custom-allocator
run: |
cargo +nightly-2024-10-06 run -Zbuild-std --target=../../target-specs/${{ matrix.mustang_target }}.json
cargo +nightly-2025-01-02 run -Zbuild-std --target=../../target-specs/${{ matrix.mustang_target }}.json
env:
RUST_BACKTRACE: 1
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude = ["/.github", "ci"]
keywords = ["linux"]

[target.'cfg(target_vendor = "mustang")'.dependencies]
c-gull = { version = "0.20.3", default-features = false, features = ["take-charge", "call-main", "malloc-via-crates"] }
c-gull = { version = "0.21.0", default-features = false, features = ["take-charge", "call-main", "malloc-via-crates"] }

[dev-dependencies]
similar-asserts = "1.1.0"
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ Let's find out! Come say hi in the [chat] or an [issue].
- Create a target file in `mustang/target-specs`, by first following
[these instructions] to generate a specification of a built-in target,
and then:
- change `is-builtin` to false
- change `dynamic-linking` to false
- add `-nostartfiles` and `-Wl,--undefined=_Unwind_Backtrace` to
pre-link-args
Expand Down
1 change: 0 additions & 1 deletion target-specs/aarch64-mustang-linux-gnu.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"features": "+v8a,+outline-atomics",
"has-rpath": true,
"has-thread-local": true,
"is-builtin": false,
"llvm-target": "aarch64-unknown-linux-gnu",
"max-atomic-width": 128,
"os": "linux",
Expand Down
1 change: 0 additions & 1 deletion target-specs/armv5te-mustang-linux-gnueabi.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"has-rpath": true,
"has-thread-local": true,
"has-thumb-interworking": true,
"is-builtin": false,
"llvm-target": "armv5te-unknown-linux-gnueabi",
"max-atomic-width": 32,
"os": "linux",
Expand Down
1 change: 0 additions & 1 deletion target-specs/i686-mustang-linux-gnu.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"env": "gnu",
"has-rpath": true,
"has-thread-local": true,
"is-builtin": false,
"llvm-target": "i686-unknown-linux-gnu",
"max-atomic-width": 64,
"os": "linux",
Expand Down
1 change: 0 additions & 1 deletion target-specs/riscv64gc-mustang-linux-gnu.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"features": "+m,+a,+f,+d,+c",
"has-rpath": true,
"has-thread-local": true,
"is-builtin": false,
"llvm-abiname": "lp64d",
"llvm-target": "riscv64-unknown-linux-gnu",
"max-atomic-width": 64,
Expand Down
1 change: 0 additions & 1 deletion target-specs/x86_64-mustang-linux-gnu.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"env": "gnu",
"has-rpath": true,
"has-thread-local": true,
"is-builtin": false,
"llvm-target": "x86_64-unknown-linux-gnu",
"max-atomic-width": 64,
"os": "linux",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn test_example(name: &str, features: &str, stdout: &str, stderr: &str) {

let mut command = Command::new("cargo");
if which::which("rustup").is_ok() {
command.arg("+nightly-2024-10-06");
command.arg("+nightly-2025-01-02");
}
command.arg("run").arg("--quiet");
if !features.is_empty() {
Expand Down
3 changes: 0 additions & 3 deletions tests/net-ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
//! c1a5ec7faf6c32af2f0aae1af4420e1bb1a3a7fe.
#![feature(ip)]
#![feature(const_ip)]
#![feature(const_ipv4)]
#![feature(const_ipv6)]

mustang::can_run_this!();

Expand Down

0 comments on commit 57f86f3

Please sign in to comment.