Skip to content

Commit fd58751

Browse files
committed
Update Rust version and patches
1 parent b6c3690 commit fd58751

File tree

2 files changed

+9
-92
lines changed

2 files changed

+9
-92
lines changed

config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
param1=${1:-}
44

5-
export RUST_COMMIT=9b00956e56009bab2aa15d7bff10916599e3d6d6
5+
export RUST_COMMIT=051478957371ee0084a7c0913941d2a8c4757bb9
66

77
# If -rust_commit specified then only export the rust commit variable
88
if [ "$param1" == "-rust_commit" ]; then

patches/rust.patch

Lines changed: 8 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,8 @@
1-
diff --git a/Cargo.lock b/Cargo.lock
2-
index 927e93f2..dfbe7db5 100644
3-
--- a/Cargo.lock
4-
+++ b/Cargo.lock
5-
@@ -734,9 +734,8 @@ checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335"
6-
7-
[[package]]
8-
name = "compiler_builtins"
9-
-version = "0.1.108"
10-
-source = "registry+https://github.com/rust-lang/crates.io-index"
11-
-checksum = "d68bc55329711cd719c2687bb147bc06211b0521f97ef398280108ccb23227e9"
12-
+version = "0.1.105"
13-
+source = "git+https://github.com/rust-lang/compiler-builtins?rev=0.1.105#80ed5f8c3ddbea7986c4a8243e42b963cb954b42"
14-
dependencies = [
15-
"cc",
16-
"rustc-std-workspace-core",
17-
diff --git a/Cargo.toml b/Cargo.toml
18-
index 5dd315ef2f7..680fb821c4c 100644
19-
--- a/Cargo.toml
20-
+++ b/Cargo.toml
21-
@@ -120,6 +120,7 @@ strip = true
22-
rustc-std-workspace-core = { path = 'library/rustc-std-workspace-core' }
23-
rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
24-
rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
25-
+compiler_builtins = { git = "https://github.com/rust-lang/compiler-builtins", rev = "0.1.105" }
26-
27-
[patch."https://github.com/rust-lang/rust-clippy"]
28-
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
291
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
30-
index 941d767b..1b4004c4 100644
2+
index fe07d1167..07e786b6c 100644
313
--- a/compiler/rustc_target/src/spec/mod.rs
324
+++ b/compiler/rustc_target/src/spec/mod.rs
33-
@@ -1618,6 +1618,7 @@ fn $module() {
5+
@@ -1731,6 +1731,7 @@ fn $module() {
346

357
("x86_64-unikraft-linux-musl", x86_64_unikraft_linux_musl),
368

@@ -39,25 +11,25 @@ index 941d767b..1b4004c4 100644
3911
("riscv32im-risc0-zkvm-elf", riscv32im_risc0_zkvm_elf),
4012
("riscv32im-unknown-none-elf", riscv32im_unknown_none_elf),
4113
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
42-
index 5ed6b357e20..a31645ab6e7 100644
14+
index cde090637..07c9c5758 100644
4315
--- a/src/bootstrap/src/lib.rs
4416
+++ b/src/bootstrap/src/lib.rs
45-
@@ -91,6 +91,10 @@
17+
@@ -95,6 +95,10 @@
4618
/* Extra values not defined in the built-in targets yet, but used in std */
4719
(Some(Mode::Std), "target_env", Some(&["libnx", "p2"])),
48-
// (Some(Mode::Std), "target_os", Some(&[])),
20+
(Some(Mode::Std), "target_os", Some(&["visionos"])),
4921
+ // #[cfg(bootstrap)] zkvm
5022
+ (Some(Mode::Std), "target_os", Some(&["zkvm"])),
5123
+ // #[cfg(bootstrap)] athena
5224
+ (Some(Mode::Std), "target_vendor", Some(&["athena", "succinct"])),
5325
(Some(Mode::Std), "target_arch", Some(&["arm64ec", "spirv", "nvptx", "xtensa"])),
26+
(Some(Mode::ToolStd), "target_os", Some(&["visionos"])),
5427
/* Extra names used by dependencies */
55-
// FIXME: Used by serde_json, but we should not be triggering on external dependencies.
5628
diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs
57-
index eab9138b..60507063 100644
29+
index bed76263b..121843a30 100644
5830
--- a/src/tools/build-manifest/src/main.rs
5931
+++ b/src/tools/build-manifest/src/main.rs
60-
@@ -123,6 +123,7 @@
32+
@@ -125,6 +125,7 @@
6133
"powerpc-unknown-linux-gnu",
6234
"powerpc64-unknown-linux-gnu",
6335
"powerpc64le-unknown-linux-gnu",
@@ -115,58 +87,3 @@ index 00000000..a84f76c2
11587
+ }
11688
+}
11789
+
118-
diff --git a/library/std/src/sys/pal/zkvm/args.rs b/library/std/src/sys/pal/zkvm/args.rs
119-
index 7753cf63840..583c16e3a47 100644
120-
--- a/library/std/src/sys/pal/zkvm/args.rs
121-
+++ b/library/std/src/sys/pal/zkvm/args.rs
122-
@@ -1,6 +1,7 @@
123-
use super::{abi, WORD_SIZE};
124-
use crate::ffi::OsString;
125-
use crate::fmt;
126-
+use crate::sys::os_str;
127-
use crate::sys_common::FromInner;
128-
129-
pub struct Args {
130-
@@ -33,7 +34,7 @@ fn argv(i: usize) -> OsString {
131-
// "os_str".
132-
let arg_bytes: &[u8] =
133-
unsafe { crate::slice::from_raw_parts(words.cast() as *const u8, arg_len) };
134-
- OsString::from_inner(super::os_str::Buf { inner: arg_bytes.to_vec() })
135-
+ OsString::from_inner(os_str::Buf { inner: arg_bytes.to_vec() })
136-
}
137-
}
138-
139-
diff --git a/library/std/src/sys/pal/zkvm/mod.rs b/library/std/src/sys/pal/zkvm/mod.rs
140-
index 228a976dbab..c5a1843d5ff 100644
141-
--- a/library/std/src/sys/pal/zkvm/mod.rs
142-
+++ b/library/std/src/sys/pal/zkvm/mod.rs
143-
@@ -12,8 +12,6 @@
144-
pub mod alloc;
145-
#[path = "../zkvm/args.rs"]
146-
pub mod args;
147-
-#[path = "../unix/cmath.rs"]
148-
-pub mod cmath;
149-
pub mod env;
150-
#[path = "../unsupported/fs.rs"]
151-
pub mod fs;
152-
diff --git a/library/std/src/sys/pal/zkvm/os.rs b/library/std/src/sys/pal/zkvm/os.rs
153-
index d8739ee3824..759beb2d306 100644
154-
--- a/library/std/src/sys/pal/zkvm/os.rs
155-
+++ b/library/std/src/sys/pal/zkvm/os.rs
156-
@@ -5,6 +5,7 @@
157-
use crate::io;
158-
use crate::marker::PhantomData;
159-
use crate::path::{self, PathBuf};
160-
+use crate::sys::os_str;
161-
use crate::sys_common::FromInner;
162-
163-
pub fn errno() -> i32 {
164-
@@ -111,7 +112,7 @@ pub fn getenv(varname: &OsStr) -> Option<OsString> {
165-
// reimplement "os_str" instead of just using the generic unix
166-
// "os_str".
167-
let u8s: &[u8] = unsafe { crate::slice::from_raw_parts(words.cast() as *const u8, nbytes) };
168-
- Some(OsString::from_inner(super::os_str::Buf { inner: u8s.to_vec() }))
169-
+ Some(OsString::from_inner(os_str::Buf { inner: u8s.to_vec() }))
170-
}
171-
172-
pub fn setenv(_: &OsStr, _: &OsStr) -> io::Result<()> {

0 commit comments

Comments
 (0)