From 77c8be47485c6682b67d67fbd8a7440738cbe6f8 Mon Sep 17 00:00:00 2001 From: Julien THILLARD Date: Fri, 20 Mar 2026 10:49:31 +0100 Subject: [PATCH] Add more from the std --- library/proc_macro | 1 - library/profiler_builtins | 1 - library/std/build.rs | 107 ----------------------------------- library/std/src/alloc.rs | 1 - library/std/src/ascii.rs | 1 - library/std/src/bstr.rs | 1 - library/std/src/collections | 1 - library/std/src/ffi | 1 - library/std/src/io | 1 - library/std/src/lib.rs | 1 - library/std/src/net | 1 - library/std/src/panic.rs | 1 - library/std/src/panicking.rs | 1 - library/std/src/pat.rs | 1 - library/std/src/path.rs | 1 - library/std/src/process | 1 - library/std/src/sync | 1 - library/test | 1 - 18 files changed, 124 deletions(-) delete mode 120000 library/proc_macro delete mode 120000 library/profiler_builtins delete mode 100644 library/std/build.rs delete mode 120000 library/std/src/alloc.rs delete mode 120000 library/std/src/ascii.rs delete mode 120000 library/std/src/bstr.rs delete mode 120000 library/std/src/collections delete mode 120000 library/std/src/ffi delete mode 120000 library/std/src/io delete mode 120000 library/std/src/lib.rs delete mode 120000 library/std/src/net delete mode 120000 library/std/src/panic.rs delete mode 120000 library/std/src/panicking.rs delete mode 120000 library/std/src/pat.rs delete mode 120000 library/std/src/path.rs delete mode 120000 library/std/src/process delete mode 120000 library/std/src/sync delete mode 120000 library/test diff --git a/library/proc_macro b/library/proc_macro deleted file mode 120000 index 0762ea5..0000000 --- a/library/proc_macro +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/proc_macro \ No newline at end of file diff --git a/library/profiler_builtins b/library/profiler_builtins deleted file mode 120000 index 79c75e5..0000000 --- a/library/profiler_builtins +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/profiler_builtins \ No newline at end of file diff --git a/library/std/build.rs b/library/std/build.rs deleted file mode 100644 index 362fc29..0000000 --- a/library/std/build.rs +++ /dev/null @@ -1,107 +0,0 @@ -use std::env; - -fn main() { - println!("cargo:rerun-if-changed=build.rs"); - let target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH was not set"); - let target_os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS was not set"); - let target_vendor = - env::var("CARGO_CFG_TARGET_VENDOR").expect("CARGO_CFG_TARGET_VENDOR was not set"); - let target_env = env::var("CARGO_CFG_TARGET_ENV").expect("CARGO_CFG_TARGET_ENV was not set"); - - println!("cargo:rustc-check-cfg=cfg(netbsd10)"); - if target_os == "netbsd" && env::var("RUSTC_STD_NETBSD10").is_ok() { - println!("cargo:rustc-cfg=netbsd10"); - } - - // Needed for `#![doc(auto_cfg(hide(no_global_oom_handling)))]` attribute. - println!("cargo::rustc-check-cfg=cfg(no_global_oom_handling)"); - - println!("cargo:rustc-check-cfg=cfg(restricted_std)"); - if target_os == "linux" - || target_os == "android" - || target_os == "netbsd" - || target_os == "dragonfly" - || target_os == "openbsd" - || target_os == "freebsd" - || target_os == "solaris" - || target_os == "illumos" - || target_os == "macos" - || target_os == "ios" - || target_os == "tvos" - || target_os == "watchos" - || target_os == "visionos" - || target_os == "windows" - || target_os == "fuchsia" - || (target_vendor == "fortanix" && target_env == "sgx") - || target_os == "motor" - || target_os == "hermit" - || target_os == "trusty" - || target_os == "l4re" - || target_os == "redox" - || target_os == "haiku" - || target_os == "vxworks" - || target_arch == "wasm32" - || target_arch == "wasm64" - || target_os == "espidf" - || target_os.starts_with("solid") - || (target_vendor == "nintendo" && target_env == "newlib") - || target_os == "vita" - || target_os == "aix" - || target_os == "nto" - || target_os == "xous" - || target_os == "hurd" - || target_os == "uefi" - || target_os == "teeos" - || target_os == "zkvm" - || target_os == "rtems" - || target_os == "nuttx" - || target_os == "cygwin" - || target_os == "vexos" - || target_os == "survos" - - // See src/bootstrap/src/core/build_steps/synthetic_targets.rs - || env::var("RUSTC_BOOTSTRAP_SYNTHETIC_TARGET").is_ok() - { - // These platforms don't have any special requirements. - } else { - // This is for Cargo's build-std support, to mark std as unstable for - // typically no_std platforms. - // This covers: - // - os=none ("bare metal" targets) - // - mipsel-sony-psp - // - nvptx64-nvidia-cuda - // - arch=avr - // - JSON targets - // - Any new targets that have not been explicitly added above. - println!("cargo:rustc-cfg=restricted_std"); - } - - println!("cargo:rustc-check-cfg=cfg(backtrace_in_libstd)"); - println!("cargo:rustc-cfg=backtrace_in_libstd"); - - println!("cargo:rustc-env=STD_ENV_ARCH={}", env::var("CARGO_CFG_TARGET_ARCH").unwrap()); - - println!("cargo:rustc-check-cfg=cfg(vxworks_lt_25_09)"); - - if target_os == "vxworks" { - match vxworks_version_code() { - Some((major, minor)) if (major, minor) < (25, 9) => { - println!("cargo:rustc-cfg=vxworks_lt_25_09"); - } - _ => {} - } - } -} - -/// Retrieve the VxWorks release version from the environment variable set by the VxWorks build -/// environment, in `(minor, patch)` form. -fn vxworks_version_code() -> Option<(u32, u32)> { - let version = env::var("WIND_RELEASE_ID").ok()?; - - let mut pieces = version.trim().split(['.']); - - let major: u32 = pieces.next().and_then(|x| x.parse().ok()).unwrap_or(0); - let minor: u32 = pieces.next().and_then(|x| x.parse().ok()).unwrap_or(0); - - Some((major, minor)) -} diff --git a/library/std/src/alloc.rs b/library/std/src/alloc.rs deleted file mode 120000 index be05cb9..0000000 --- a/library/std/src/alloc.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/alloc.rs \ No newline at end of file diff --git a/library/std/src/ascii.rs b/library/std/src/ascii.rs deleted file mode 120000 index ebc37f8..0000000 --- a/library/std/src/ascii.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/ascii.rs \ No newline at end of file diff --git a/library/std/src/bstr.rs b/library/std/src/bstr.rs deleted file mode 120000 index 9126d94..0000000 --- a/library/std/src/bstr.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/bstr.rs \ No newline at end of file diff --git a/library/std/src/collections b/library/std/src/collections deleted file mode 120000 index 832b356..0000000 --- a/library/std/src/collections +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections \ No newline at end of file diff --git a/library/std/src/ffi b/library/std/src/ffi deleted file mode 120000 index 8140a6f..0000000 --- a/library/std/src/ffi +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/ffi \ No newline at end of file diff --git a/library/std/src/io b/library/std/src/io deleted file mode 120000 index dcda1d7..0000000 --- a/library/std/src/io +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/io \ No newline at end of file diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs deleted file mode 120000 index 25aff23..0000000 --- a/library/std/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lib.rs \ No newline at end of file diff --git a/library/std/src/net b/library/std/src/net deleted file mode 120000 index 703e90d..0000000 --- a/library/std/src/net +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/net \ No newline at end of file diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs deleted file mode 120000 index 57f5a73..0000000 --- a/library/std/src/panic.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs \ No newline at end of file diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs deleted file mode 120000 index 4653bf2..0000000 --- a/library/std/src/panicking.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs \ No newline at end of file diff --git a/library/std/src/pat.rs b/library/std/src/pat.rs deleted file mode 120000 index f35ae81..0000000 --- a/library/std/src/pat.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/pat.rs \ No newline at end of file diff --git a/library/std/src/path.rs b/library/std/src/path.rs deleted file mode 120000 index f620d82..0000000 --- a/library/std/src/path.rs +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs \ No newline at end of file diff --git a/library/std/src/process b/library/std/src/process deleted file mode 120000 index 6e85d33..0000000 --- a/library/std/src/process +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process \ No newline at end of file diff --git a/library/std/src/sync b/library/std/src/sync deleted file mode 120000 index 5a71d24..0000000 --- a/library/std/src/sync +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync \ No newline at end of file diff --git a/library/test b/library/test deleted file mode 120000 index 03a5f8a..0000000 --- a/library/test +++ /dev/null @@ -1 +0,0 @@ -/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/test \ No newline at end of file