Skip to content

Commit f125ce7

Browse files
committed
Upgrade toolchain to nightly-2025-05-20
1 parent 599012d commit f125ce7

File tree

11 files changed

+57
-31
lines changed

11 files changed

+57
-31
lines changed

.devcontainer/rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[toolchain]
22
profile = "minimal"
3-
channel = "nightly-2025-01-18"
3+
channel = "nightly-2025-05-20"
44
components = ["rust-src", "llvm-tools", "rustfmt", "clippy"]
55
targets = [
66
"x86_64-unknown-none",

.github/workflows/ci.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
rust-toolchain: [nightly, nightly-2025-01-18]
14+
rust-toolchain: [nightly, nightly-2025-05-20]
1515
arch: [x86_64, riscv64, aarch64, loongarch64]
1616
steps:
1717
- uses: actions/checkout@v4
@@ -41,7 +41,7 @@ jobs:
4141
matrix:
4242
os: [ubuntu-latest]
4343
arch: [x86_64, riscv64, aarch64, loongarch64]
44-
rust-toolchain: [nightly, nightly-2025-01-18]
44+
rust-toolchain: [nightly, nightly-2025-05-20]
4545
steps:
4646
- uses: actions/checkout@v4
4747
- uses: dtolnay/rust-toolchain@stable
@@ -50,6 +50,9 @@ jobs:
5050
components: rust-src, llvm-tools
5151
targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat, loongarch64-unknown-none
5252
- uses: Swatinem/rust-cache@v2
53+
with:
54+
shared-key: cargo-bin-cache
55+
cache-targets: false
5356
- run: cargo install cargo-binutils
5457
- run: ./scripts/get_deps.sh
5558
- uses: arceos-org/setup-musl@v1
@@ -66,14 +69,17 @@ jobs:
6669
matrix:
6770
os: [ubuntu-latest]
6871
arch: [x86_64, riscv64, aarch64, loongarch64]
69-
rust-toolchain: [nightly-2025-01-18]
72+
rust-toolchain: [nightly-2025-05-20]
7073
steps:
7174
- uses: actions/checkout@v4
7275
- uses: dtolnay/rust-toolchain@stable
7376
with:
7477
toolchain: ${{ matrix.rust-toolchain }}
7578
components: rust-src, llvm-tools
7679
- uses: Swatinem/rust-cache@v2
80+
with:
81+
shared-key: cargo-bin-cache
82+
cache-targets: false
7783
- run: cargo install cargo-binutils
7884
- run: ./scripts/get_deps.sh
7985
- uses: arceos-org/setup-musl@v1
@@ -96,14 +102,17 @@ jobs:
96102
matrix:
97103
os: [ubuntu-latest]
98104
arch: [x86_64, riscv64, aarch64, loongarch64]
99-
rust-toolchain: [nightly-2025-01-18]
105+
rust-toolchain: [nightly-2025-05-20]
100106
steps:
101107
- uses: actions/checkout@v4
102108
- uses: dtolnay/rust-toolchain@stable
103109
with:
104110
toolchain: ${{ matrix.rust-toolchain }}
105111
components: rust-src, llvm-tools
106112
- uses: Swatinem/rust-cache@v2
113+
with:
114+
shared-key: cargo-bin-cache
115+
cache-targets: false
107116
- run: cargo install cargo-binutils
108117
- run: ./scripts/get_deps.sh
109118
- uses: arceos-org/setup-musl@v1

.github/workflows/docs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build & Deploy docs
33
on: [push, pull_request]
44

55
env:
6-
rust-toolchain: nightly-2025-01-18
6+
rust-toolchain: nightly-2025-05-20
77

88
jobs:
99
doc:
@@ -20,6 +20,9 @@ jobs:
2020
with:
2121
toolchain: ${{ env.rust-toolchain }}
2222
- uses: Swatinem/rust-cache@v2
23+
with:
24+
shared-key: cargo-bin-cache
25+
cache-targets: false
2326
- run: cargo install cargo-binutils
2427
- run: ./scripts/get_deps.sh
2528
- uses: arceos-org/setup-musl@v1

Cargo.lock

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

api/src/imp/fs/ctl.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ pub fn sys_getdents64(fd: i32, buf: UserPtr<u8>, len: usize) -> LinuxResult<isiz
139139
let dir = Directory::from_fd(fd)?;
140140

141141
let mut last_dirent = dir.last_dirent();
142-
if let Some(ent) = last_dirent.take() {
143-
if !buffer.write_entry(ent.entry_type().into(), ent.name_as_bytes()) {
144-
*last_dirent = Some(ent);
145-
return Err(LinuxError::EINVAL);
146-
}
142+
if let Some(ent) = last_dirent.take()
143+
&& !buffer.write_entry(ent.entry_type().into(), ent.name_as_bytes())
144+
{
145+
*last_dirent = Some(ent);
146+
return Err(LinuxError::EINVAL);
147147
}
148148

149149
let mut inner = dir.inner();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
22
profile = "minimal"
33
# use the nightly version of the last stable toolchain, see <https://forge.rust-lang.org/>
4-
channel = "nightly-2025-01-18"
4+
channel = "nightly-2025-05-20"
55
components = ["rust-src", "llvm-tools-preview", "rustfmt", "clippy"]

apps/nimbos/rust/src/arch/aarch64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn syscall(id: usize, args: [usize; 3]) -> isize {
1616
ret
1717
}
1818

19-
#[naked]
19+
#[unsafe(naked)]
2020
#[allow(improper_ctypes_definitions)]
2121
pub extern "C" fn sys_clone(_entry: fn(usize) -> i32, _arg: usize, _newsp: usize) -> isize {
2222
// sys_clone(entry, arg, newsp)

apps/nimbos/rust/src/arch/riscv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn syscall(id: usize, args: [usize; 3]) -> isize {
1616
ret
1717
}
1818

19-
#[naked]
19+
#[unsafe(naked)]
2020
#[allow(improper_ctypes_definitions)]
2121
pub extern "C" fn sys_clone(_entry: fn(usize) -> i32, _arg: usize, _newsp: usize) -> isize {
2222
// sys_clone(entry, arg, newsp)

apps/nimbos/rust/src/arch/x86_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn syscall(id: usize, args: [usize; 3]) -> isize {
1818
ret
1919
}
2020

21-
#[naked]
21+
#[unsafe(naked)]
2222
#[allow(improper_ctypes_definitions)]
2323
pub extern "C" fn sys_clone(_entry: fn(usize) -> i32, _arg: usize, _newsp: usize) -> isize {
2424
// sys_clone(entry, arg, newsp)

build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn main() {
1313
fn link_app_data(arch: &str) -> Result<()> {
1414
let testcase = option_env!("AX_TESTCASE").unwrap_or("nimbos");
1515

16-
let app_path = PathBuf::from(format!("apps/{}/build/{}", testcase, arch));
16+
let app_path = PathBuf::from(format!("apps/{testcase}/build/{arch}"));
1717
let link_app_path = PathBuf::from(std::env::var("OUT_DIR").unwrap()).join("link_app.S");
1818

1919
if let Ok(dir) = read_dir(&app_path) {
@@ -35,8 +35,8 @@ _app_count:
3535
apps.len()
3636
)?;
3737
for i in 0..apps.len() {
38-
writeln!(f, " .quad app_{}_name", i)?;
39-
writeln!(f, " .quad app_{}_start", i)?;
38+
writeln!(f, " .quad app_{i}_name")?;
39+
writeln!(f, " .quad app_{i}_start")?;
4040
}
4141
writeln!(f, " .quad app_{}_end", apps.len() - 1)?;
4242

0 commit comments

Comments
 (0)