Repository navigation
windows-gnullvm: always link libunwind statically - #160712
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
windows-gnullvm: always link libunwind statically try-job: *gnullvm
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
@bors try jobs=*llvm-mingw |
This comment has been minimized.
This comment has been minimized.
windows-gnullvm: always link libunwind statically try-job: *llvm-mingw
This comment has been minimized.
This comment has been minimized.
501c282 to
aa3688d
Compare
This comment has been minimized.
This comment has been minimized.
aa3688d to
e2eb974
Compare
|
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb |
|
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
I'm not sure what kind of approval this change will require (r+, FCP, MCP+second?). |
That was in a zulip DM.
According to @mati865 for as long as 32bit libgcc_s isn't involved as unwinder, multiple unwinder copies will interact just fine with each other. In the case of -gnullvm, we already always use libunwind rather than libgcc_s as unwinder. |
Then my question is what are the downsides of supporting the static vs dynamic choice under an option like in #159782. |
|
Unlike on -gnu there is no breakage that would occur from not supporting it. It only increases the size of dylibs by 40KiB by adding a copy of libunwind, but in doing so makes distribution of the dylibs easier by not having to ship libunwind.dll as user. |
On Windows with 32-bit libgcc built with Dwarf-2 exception model? Not at all. [*] IIRC, on 32-bits libunwind will break if specific libgcc_{eh,s} symbols are present in the binary.
Just like Bjorn wrote, but remember that they no longer need to ship Decided to double-check if memory serves me right to avoid potentially misleading everyone. Heck, libgcc is even worse than I remembered (or it has regressed). 32-bit GCC preparation:Runing libgcc case: Don’t even get me started on what happened here, instead I'll move to something sane. 32-bit Clang preparationRunning libunwind case: |
|
Ok, thanks for the explanations! |
…r=petrochenkov
windows-gnullvm: always link libunwind statically
Previously shared library was used by default, meaning that programs and libraries couldn't be loaded if `libunwind.dll` was missing from the PATH. Using Wine (on Linux) because it better shows the problem (and is more convenient):
```
❯ cargo new hello &> /dev/null
❯ cargo rustc --target x86_64-pc-windows-gnullvm &> /dev/null
❯ wine target/x86_64-pc-windows-gnullvm/debug/hello.exe
0024:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\\tmp\\hello\\target\\x86_64-pc-windows-gnullvm\\debug\\hello.exe") not found
0024:err:module:loader_init Importing dlls for L"Z:\\tmp\\hello\\target\\x86_64-pc-windows-gnullvm\\debug\\hello.exe" failed, status c0000135
❯ llvm-readobj --coff-imports target/x86_64-pc-windows-gnullvm/debug/hello.exe
...
Import {
Name: libunwind.dll
ImportLookupTableRVA: 0x3D308
ImportAddressTableRVA: 0x3D678
Symbol: _GCC_specific_handler (0)
Symbol: _Unwind_DeleteException (0)
Symbol: _Unwind_GetDataRelBase (0)
Symbol: _Unwind_GetIPInfo (0)
Symbol: _Unwind_GetLanguageSpecificData (0)
Symbol: _Unwind_GetRegionStart (0)
Symbol: _Unwind_GetTextRelBase (0)
Symbol: _Unwind_RaiseException (0)
Symbol: _Unwind_Resume (0)
Symbol: _Unwind_SetGR (0)
Symbol: _Unwind_SetIP (0)
}
...
```
Optionally libunwind could be linked statically via `+crt-static`:
```
❯ cargo rustc --target x86_64-pc-windows-gnullvm -- -C target-feature=+crt-static &> /dev/null
❯ wine target/x86_64-pc-windows-gnullvm/debug/hello.exe
Hello, world!
❯ llvm-readobj --coff-imports target/x86_64-pc-windows-gnullvm/debug/hello.exe | rg 'libunwind.dll' || echo "doesn't depend on shared libunwind"
doesn't depend on shared libunwind
```
After a discussion of approach in rust-lang#159782 with @bjorn3 (thanks BTW!), I changed the proposed approach to always link static libunwind.
I don't have a good solution for rust-lang#121794 that will resurface. I guess the user has three options:
- symlink `libunwind.dll.a` as `libunwind.a`
- add `--unwindlib=none -lunwind` to the linker args
- create linker wrapper
- use self-contained mode which is likely is undesirable
I think the ease of use (not having to deal with additional DLL dependency) outweights the benefit of working with incomplete C toolchain.
The size bloat is also not a problem, sizes (in bytes) of the binary for the literal hello world project:
- debug build:
- shared libunwind 4194816
- static libunwind 4323328
- release build:
- shared libunwind 382464
- static libunwind 423424
Debug diff +125.5 KiB, release diff: +40 KiB.
Size of `libunwind.dll` that has to be provided when linking shared libunwind: 204288 bytes (199.5 KiB).
…uwer Rollup of 6 pull requests Successful merges: - #162309 (offload: automate manual clang-linker-wrapper step) - #160505 (delegation: supporting inherent impls) - #160712 (windows-gnullvm: always link libunwind statically) - #161423 (trait_selection: Keep type-op region constraints in borrowck) - #162461 (limit the api of `fold_predicate` and `visit_predicate`) - #162475 (Fix unsoundness bug on next trait solver for dyn const generics placeholder)
Rollup merge of #160712 - mati865:gnullvm-static-libunwind, r=petrochenkov windows-gnullvm: always link libunwind statically Previously shared library was used by default, meaning that programs and libraries couldn't be loaded if `libunwind.dll` was missing from the PATH. Using Wine (on Linux) because it better shows the problem (and is more convenient): ``` ❯ cargo new hello &> /dev/null ❯ cargo rustc --target x86_64-pc-windows-gnullvm &> /dev/null ❯ wine target/x86_64-pc-windows-gnullvm/debug/hello.exe 0024:err:module:import_dll Library libunwind.dll (which is needed by L"Z:\\tmp\\hello\\target\\x86_64-pc-windows-gnullvm\\debug\\hello.exe") not found 0024:err:module:loader_init Importing dlls for L"Z:\\tmp\\hello\\target\\x86_64-pc-windows-gnullvm\\debug\\hello.exe" failed, status c0000135 ❯ llvm-readobj --coff-imports target/x86_64-pc-windows-gnullvm/debug/hello.exe ... Import { Name: libunwind.dll ImportLookupTableRVA: 0x3D308 ImportAddressTableRVA: 0x3D678 Symbol: _GCC_specific_handler (0) Symbol: _Unwind_DeleteException (0) Symbol: _Unwind_GetDataRelBase (0) Symbol: _Unwind_GetIPInfo (0) Symbol: _Unwind_GetLanguageSpecificData (0) Symbol: _Unwind_GetRegionStart (0) Symbol: _Unwind_GetTextRelBase (0) Symbol: _Unwind_RaiseException (0) Symbol: _Unwind_Resume (0) Symbol: _Unwind_SetGR (0) Symbol: _Unwind_SetIP (0) } ... ``` Optionally libunwind could be linked statically via `+crt-static`: ``` ❯ cargo rustc --target x86_64-pc-windows-gnullvm -- -C target-feature=+crt-static &> /dev/null ❯ wine target/x86_64-pc-windows-gnullvm/debug/hello.exe Hello, world! ❯ llvm-readobj --coff-imports target/x86_64-pc-windows-gnullvm/debug/hello.exe | rg 'libunwind.dll' || echo "doesn't depend on shared libunwind" doesn't depend on shared libunwind ``` After a discussion of approach in #159782 with @bjorn3 (thanks BTW!), I changed the proposed approach to always link static libunwind. I don't have a good solution for #121794 that will resurface. I guess the user has three options: - symlink `libunwind.dll.a` as `libunwind.a` - add `--unwindlib=none -lunwind` to the linker args - create linker wrapper - use self-contained mode which is likely is undesirable I think the ease of use (not having to deal with additional DLL dependency) outweights the benefit of working with incomplete C toolchain. The size bloat is also not a problem, sizes (in bytes) of the binary for the literal hello world project: - debug build: - shared libunwind 4194816 - static libunwind 4323328 - release build: - shared libunwind 382464 - static libunwind 423424 Debug diff +125.5 KiB, release diff: +40 KiB. Size of `libunwind.dll` that has to be provided when linking shared libunwind: 204288 bytes (199.5 KiB).
|
Do you think this is worth release notes line? |
|
I think so. |
…uwer Rollup of 6 pull requests Successful merges: - rust-lang/rust#162309 (offload: automate manual clang-linker-wrapper step) - rust-lang/rust#160505 (delegation: supporting inherent impls) - rust-lang/rust#160712 (windows-gnullvm: always link libunwind statically) - rust-lang/rust#161423 (trait_selection: Keep type-op region constraints in borrowck) - rust-lang/rust#162461 (limit the api of `fold_predicate` and `visit_predicate`) - rust-lang/rust#162475 (Fix unsoundness bug on next trait solver for dyn const generics placeholder)
Pkgsrc changes: * Version & checksum changes. * Adapt patches to match. Upstream changes: Version 1.100.0 (2026-11-12) ========================== Language -------- - [Stabilize never type] (rust-lang/rust#155499) - [Lint against repeated `#[repr(..)]` attributes] (rust-lang/rust#157036) - [Stabilize `extern "custom"`] (rust-lang/rust#158504) - [Extend `dropping_references`, `dropping_copy_types` and `undropped_manually_drops` lints to `drop_in_place`] (rust-lang/rust#160229) - [`unfulfilled_lint_expectations` no longer fires on `#[expect(dead_code)]` inside code that is covered by a dead parent's diagnostic] (rust-lang/rust#161005) - [Turn the error for `repr(align)` fields in a `repr(packed)` type into a deny-by-default lint `aligned_fields_in_packed`] (rust-lang/rust#162160) - [volatile: allow accesses to non-AM memory to trap] (rust-lang/rust#160564) Compiler -------- - [Stabilize `-Cprofile-sample-use`] (rust-lang/rust#155942) - [Enable next solver by default in orphanck] (rust-lang/rust#160668) Platform Support ---------------- - [`i686-pc-windows-gnu` is now a tier 2 without host tools target] (rust-lang/rust#161681) - [Promote `wasm32-wasip3` to Tier 2] (rust-lang/rust#161940) - [Add new Tier 3 target `powerpc64-sony-ps3`] (rust-lang/rust#162072) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html Libraries --------- - [Stabilize custom allocators] (rust-lang/rust#156882) - [Map `ENOTSUP` to `ErrorKind::Unsupported`] (rust-lang/rust#158580) - [Fix soundness issues in `std::sys::pal::sgx::waitqueue::unsafe_list`] (rust-lang/rust#161334) Stabilized APIs --------------- - [`impl PartialEq<Cow<'_, [U]>> for Vec<T, A>`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-Vec%3CT,+A%3E) - [`impl PartialEq<Cow<'_, [U]>> for &[T]`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26%5BT%5D) - [`impl PartialEq<Cow<'_, [U]>> for &mut [T]`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26mut+%5BT%5D) - [`std::alloc::Allocator`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html) - [`std::alloc::Global`] (https://doc.rust-lang.org/stable/std/alloc/struct.Global.html) - [`std::alloc::System`] (https://doc.rust-lang.org/stable/std/alloc/struct.System.html) - [`impl Allocator for Global`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Global) - [`impl Allocator for System`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-System) - [`impl<A: Allocator> Allocator for &A`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26A) - [`impl<T: Allocator, A: Allocator> Allocator for Box<T, A>`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Box%3CT,+A%3E) - [`impl<A: Allocator> Allocator for &mut A`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26mut+A) - [`impl<T: Allocator, A: Allocator> Allocator for Arc<T, A>`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Arc%3CT,+A%3E) - [`impl<T: Allocator, A: Allocator> Allocator for Rc<T, A>`] (https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Rc%3CT,+A%3E) - [`Box::new_in`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_in) - [`Box::from_raw_in`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_raw_in) - [`Box::from_non_null_in`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_non_null_in) - [`Box::into_raw_with_allocator`] (https://doc.rust-lang.org/std/std/boxed/struct.Box.html#method.into_raw_with_allocator) - [`Box::into_non_null_with_allocator`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_non_null_with_allocator) - [`Box::allocator`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.allocator) - [`Vec::new_in`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.new_in) - [`Vec::with_capacity_in`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.with_capacity_in) - [`Vec::from_raw_parts_in`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_raw_parts_in) - [`Vec::from_parts_in`] (https://doc.rust-lang.org/stable/stable/vec/struct.Vec.html#method.from_parts_in) - [`Vec::into_raw_parts_with_allocator`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts_with_allocator) - [`Vec::into_parts_with_allocator`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_parts_with_allocator) - [`Vec::allocator`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.allocator) - [`Child::main_thread_handle`] (https://doc.rust-lang.org/stable/std/os/windows/process/trait.ChildExt.html#tymethod.main_thread_handle) - [`impl Default for std::sync::Once`] (https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-Default-for-Once) - [`bool::toggle`] (https://doc.rust-lang.org/stable/std/primitive.bool.html#method.toggle) - [`Box::take`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.take) - [`Box::map`] (https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.map) - [`Rc::map`] (https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.map) - [`Arc::map`] (https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.map) - [`impl AsRef<T> for !`] (https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsRef<T>-for-!) - [`impl AsMut<T> for !`] (https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsMut<T>-for-!) - [`core::mem::DropGuard`] (https://doc.rust-lang.org/stable/core/mem/struct.DropGuard.html) - [`core::mem::conjure_zst`] (https://doc.rust-lang.org/stable/core/mem/fn.conjure_zst.html) - [`UnsafeCell::replace`] (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.replace) - [`UnsafeCell::as_ref_unchecked`] (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_ref_unchecked) - [`UnsafeCell::as_mut_unchecked`] (https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_mut_unchecked) - [`str::trim_prefix`] (https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_prefix) - [`str::trim_suffix`] (https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_suffix) - [`[T]::trim_prefix`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_prefix) - [`[T]::trim_suffix`] (https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_suffix) - [`Path::trim_prefix`] (https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.trim_prefix) - [`Vec::from_fn`] (https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_fn) - [`os::windows::process::CommandExt::show_window`] (https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.show_window) Cargo ----- - Introduced Cargo's own linting system: some Cargo warnings are now emitted as lints that users can control in the `[lints.cargo]` table. This includes a new built-in unused dependency check via the `cargo::unused_dependencies` lint. [docs](https://doc.rust-lang.org/stable/cargo/reference/lints.html) [#17298](rust-lang/cargo#17298) - Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in `Cargo.lock`. ([RFC 3923] (https://rust-lang.github.io/rfcs/3923-cargo-min-publish-age.html)) [docs] (https://doc.rust-lang.org/stable/cargo/reference/resolver.html#publish-age) [#17335] (rust-lang/cargo#17335) - cargo-install: now uses the existing lockfile in the `.crate` tarball by default. `--locked` in cargo install becomes a no-op. [#17388](rust-lang/cargo#17388) - Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use [Cargoâs JSON messages] (https://doc.rust-lang.org/stable/cargo/reference/external-tools.html#json-messages) to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. ([build cache doc] (https://doc.rust-lang.org/stable/cargo/reference/build-cache.html)) [#17354](rust-lang/cargo#17354) Rustdoc ----- - [Add new `invalid_markdown_table` rustdoc lint] (rust-lang/rust#159583) Compatibility Notes ------------------- - [Closures now more precisely capture variables used in `if let`. This may cause new errors] (rust-lang/rust#154210) - [Check dyn-compatibility of trait objects in more places] (rust-lang/rust#154992) - [`Infallible` is now a type alias to `!`] (rust-lang/rust#155499) - [The never type fallback was changed to `!` on all editions] (rust-lang/rust#155499) - [`box` patterns are no longer syntactically allowed] (rust-lang/rust#156749) - [Report Query Cycle errors in more cases when computing the layout of enums with explicit discriminants] (rust-lang/rust#157562) - [Always escape grapheme extenders in `str::escape_debug`] (rust-lang/rust#158303) - [Make let-else respect `macro_rules` `expr` metavariable grouping] (rust-lang/rust#158515) - [`Iterator::{min,max}(_by_key)` changed which `Ord` methods they use.] (rust-lang/rust#160203) This cannot change behaviour (other than being potentially faster) for types correctly following the [`Ord` rules] (https://doc.rust-lang.org/std/cmp/trait.Ord.html), but may impact types with inconsistent trait implementations. - [Emit an error when trying to enable SSE/AVX on an x86 (32bit or 64bit) softfloat target] (rust-lang/rust#160302) - [Require windowed (and exception) for Xtensa ABI] (rust-lang/rust#160643) - [windows-gnullvm: always link libunwind statically] (rust-lang/rust#160712) - [From version 1.94 up to 1.100 a number of ARMv7-A hardfloat targets required the `VFPv3-D32` FPU as a minimum, as they erroneously had the `d32` feature in their baseline list of features. Breakage introduced as a result of correcting this can be fixed by passing `-Ctarget-feature=+d32` to Rust.] (rust-lang/rust#160911) - [Change "Rust" ABI on x86 to use SSE registers if they are always-available for the current target] (rust-lang/rust#161583) - [Make the `ambiguous_glob_imported_traits` lint fire in slightly more cases] (rust-lang/rust#161805) - [Make `+fix-cortex-a53-835769` a default feature for `aarch64-unknown-fuchsia`] (rust-lang/rust#161886) - [Some impls on `Box` have been generalised to arbitrary allocators, which may cause new type inference errors] (rust-lang/rust#161946) - [The standard library now uses Unicode version 18.0.0] (https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.UNICODE_VERSION) - [WASI SDK version was bumped from 33 to 34] (rust-lang/rust#163809) - [On ARM targets, `-Ctarget-feature`/`-Ctarget-cpu` values that would alter the ABI are rejected as hard errors now.] (rust-lang/rust#161280) Other ----- - [Test harness now allows passing `--test-threads` and `--color` multiple times, with later arguments overriding earlier ones] (rust-lang/rust#161312)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [rust](https://rust-lang.org/) ([source](https://github.com/rust-lang/rust), [changelog](https://github.com/rust-lang/rust/blob/main/RELEASES.md)) | tools | minor | `1.99.1` → `1.100.0` | | [rust](https://hub.docker.com/_/rust) ([source](https://github.com/rust-lang/docker-rust)) | stage | minor | `1.99-slim-trixie` → `1.100-slim-trixie` | | [rust](https://hub.docker.com/_/rust) ([source](https://github.com/rust-lang/docker-rust)) | final | minor | `1.99-slim-trixie` → `1.100-slim-trixie` | --- ### Release Notes <details> <summary>rust-lang/rust (rust)</summary> ### [`v1.100.0`](https://github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-11000-2026-11-12) [Compare Source](rust-lang/rust@1.99.1...1.100.0) \========================== <a id="1.100.0-Language"></a> ## Language - [Stabilize never type](rust-lang/rust#155499) - [Lint against repeated `#[repr(..)]` attributes](rust-lang/rust#157036) - [Stabilize `extern "custom"`](rust-lang/rust#158504) - [Extend `dropping_references`, `dropping_copy_types` and `undropped_manually_drops` lints to `drop_in_place`](rust-lang/rust#160229) - [`unfulfilled_lint_expectations` no longer fires on `#[expect(dead_code)]` inside code that is covered by a dead parent's diagnostic](rust-lang/rust#161005) - [Turn the error for `repr(align)` fields in a `repr(packed)` type into a deny-by-default lint `aligned_fields_in_packed`](rust-lang/rust#162160) - [volatile: allow accesses to non-AM memory to trap](rust-lang/rust#160564) <a id="1.100.0-Compiler"></a> ## Compiler - [Stabilize `-Cprofile-sample-use`](rust-lang/rust#155942) - [Enable next solver by default in orphanck](rust-lang/rust#160668) <a id="1.100.0-Platform-Support"></a> ## Platform Support - [`i686-pc-windows-gnu` is now a tier 2 without host tools target](rust-lang/rust#161681) - [Promote `wasm32-wasip3` to Tier 2](rust-lang/rust#161940) - [Add new Tier 3 target `powerpc64-sony-ps3`](rust-lang/rust#162072) Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html <a id="1.100.0-Libraries"></a> ## Libraries - [Stabilize custom allocators](rust-lang/rust#156882) - [Map `ENOTSUP` to `ErrorKind::Unsupported`](rust-lang/rust#158580) - [Fix soundness issues in `std::sys::pal::sgx::waitqueue::unsafe_list`](rust-lang/rust#161334) <a id="1.100.0-Stabilized-APIs"></a> ## Stabilized APIs - [`impl PartialEq<Cow<'_, [U]>> for Vec<T, A>`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-Vec%3CT,+A%3E) - [`impl PartialEq<Cow<'_, [U]>> for &[T]`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26%5BT%5D) - [`impl PartialEq<Cow<'_, [U]>> for &mut [T]`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-PartialEq%3CCow%3C'_,+%5BU%5D%3E%3E-for-%26mut+%5BT%5D) - [`std::alloc::Allocator`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html) - [`std::alloc::Global`](https://doc.rust-lang.org/stable/std/alloc/struct.Global.html) - [`std::alloc::System`](https://doc.rust-lang.org/stable/std/alloc/struct.System.html) - [`impl Allocator for Global`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Global) - [`impl Allocator for System`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-System) - [`impl<A: Allocator> Allocator for &A`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26A) - [`impl<T: Allocator, A: Allocator> Allocator for Box<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Box%3CT,+A%3E) - [`impl<A: Allocator> Allocator for &mut A`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-%26mut+A) - [`impl<T: Allocator, A: Allocator> Allocator for Arc<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Arc%3CT,+A%3E) - [`impl<T: Allocator, A: Allocator> Allocator for Rc<T, A>`](https://doc.rust-lang.org/stable/std/alloc/trait.Allocator.html#impl-Allocator-for-Rc%3CT,+A%3E) - [`Box::new_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.new_in) - [`Box::from_raw_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_raw_in) - [`Box::from_non_null_in`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.from_non_null_in) - [`Box::into_raw_with_allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_raw_with_allocator) - [`Box::into_non_null_with_allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_non_null_with_allocator) - [`Box::allocator`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.allocator) - [`Vec::new_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.new_in) - [`Vec::with_capacity_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.with_capacity_in) - [`Vec::from_raw_parts_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_raw_parts_in) - [`Vec::from_parts_in`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_parts_in) - [`Vec::into_raw_parts_with_allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_raw_parts_with_allocator) - [`Vec::into_parts_with_allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.into_parts_with_allocator) - [`Vec::allocator`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.allocator) - [`Child::main_thread_handle`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.ChildExt.html#tymethod.main_thread_handle) - [`impl Default for std::sync::Once`](https://doc.rust-lang.org/stable/std/sync/struct.Once.html#impl-Default-for-Once) - [`bool::toggle`](https://doc.rust-lang.org/stable/std/primitive.bool.html#method.toggle) - [`Box::take`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.take) - [`Box::map`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.map) - [`Rc::map`](https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.map) - [`Arc::map`](https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.map) - [`impl AsRef<T> for !`](https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsRef<T>-for-!) - [`impl AsMut<T> for !`](https://doc.rust-lang.org/stable/std/primitive.never.html#impl-AsMut<T>-for-!) - [`core::mem::DropGuard`](https://doc.rust-lang.org/stable/core/mem/struct.DropGuard.html) - [`core::mem::conjure_zst`](https://doc.rust-lang.org/stable/core/mem/fn.conjure_zst.html) - [`UnsafeCell::replace`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.replace) - [`UnsafeCell::as_ref_unchecked`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_ref_unchecked) - [`UnsafeCell::as_mut_unchecked`](https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.as_mut_unchecked) - [`str::trim_prefix`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_prefix) - [`str::trim_suffix`](https://doc.rust-lang.org/stable/std/primitive.str.html#method.trim_suffix) - [`[T]::trim_prefix`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_prefix) - [`[T]::trim_suffix`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.trim_suffix) - [`Path::trim_prefix`](https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.trim_prefix) - [`Vec::from_fn`](https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.from_fn) - [`os::windows::process::CommandExt::show_window`](https://doc.rust-lang.org/stable/std/os/windows/process/trait.CommandExt.html#tymethod.show_window) <a id="1.100.0-Cargo"></a> ## Cargo - Introduced Cargo's own linting system: some Cargo warnings are now emitted as lints that users can control in the `[lints.cargo]` table. This includes a new built-in unused dependency check via the `cargo::unused_dependencies` lint. [docs](https://doc.rust-lang.org/stable/cargo/reference/lints.html) [#​17298](rust-lang/cargo#17298) - Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in `Cargo.lock`. ([RFC 3923](https://rust-lang.github.io/rfcs/3923-cargo-min-publish-age.html)) [docs](https://doc.rust-lang.org/stable/cargo/reference/resolver.html#publish-age) [#​17335](rust-lang/cargo#17335) - cargo-install: now uses the existing lockfile in the `.crate` tarball by default. `--locked` in cargo install becomes a no-op. [#​17388](rust-lang/cargo#17388) - Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use [Cargo’s JSON messages](https://doc.rust-lang.org/stable/cargo/reference/external-tools.html#json-messages) to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. ([build cache doc](https://doc.rust-lang.org/stable/cargo/reference/build-cache.html)) [#​17354](rust-lang/cargo#17354) ## Rustdoc - [Add new `invalid_markdown_table` rustdoc lint](rust-lang/rust#159583) <a id="1.100.0-Compatibility-Notes"></a> ## Compatibility Notes - [Closures now more precisely capture variables used in `if let`. This may cause new errors](rust-lang/rust#154210) - [Check dyn-compatibility of trait objects in more places](rust-lang/rust#154992) - [`Infallible` is now a type alias to `!`](rust-lang/rust#155499) - [The never type fallback was changed to `!` on all editions](rust-lang/rust#155499) - [`box` patterns are no longer syntactically allowed](rust-lang/rust#156749) - [Report Query Cycle errors in more cases when computing the layout of enums with explicit discriminants](rust-lang/rust#157562) - [Always escape grapheme extenders in `str::escape_debug`](rust-lang/rust#158303) - [Make let-else respect `macro_rules` `expr` metavariable grouping](rust-lang/rust#158515) - [`Iterator::{min,max}(_by_key)` changed which `Ord` methods they use.](rust-lang/rust#160203) This cannot change behaviour (other than being potentially faster) for types correctly following the [`Ord` rules](https://doc.rust-lang.org/std/cmp/trait.Ord.html), but may impact types with inconsistent trait implementations. - [Emit an error when trying to enable SSE/AVX on an x86 (32bit or 64bit) softfloat target](rust-lang/rust#160302) - [Require windowed (and exception) for Xtensa ABI](rust-lang/rust#160643) - [windows-gnullvm: always link libunwind statically](rust-lang/rust#160712) - [From version 1.94 up to 1.100 a number of ARMv7-A hardfloat targets required the `VFPv3-D32` FPU as a minimum, as they erroneously had the `d32` feature in their baseline list of features. Breakage introduced as a result of correcting this can be fixed by passing `-Ctarget-feature=+d32` to Rust.](rust-lang/rust#160911) - [Change "Rust" ABI on x86 to use SSE registers if they are always-available for the current target](rust-lang/rust#161583) - [Make the `ambiguous_glob_imported_traits` lint fire in slightly more cases](rust-lang/rust#161805) - [Make `+fix-cortex-a53-835769` a default feature for `aarch64-unknown-fuchsia`](rust-lang/rust#161886) - [Some impls on `Box` have been generalised to arbitrary allocators, which may cause new type inference errors](rust-lang/rust#161946) - [The standard library now uses Unicode version 18.0.0](https://doc.rust-lang.org/stable/std/primitive.char.html#associatedconstant.UNICODE_VERSION) - [WASI SDK version was bumped from 33 to 34](rust-lang/rust#163809) - [On ARM targets, `-Ctarget-feature`/`-Ctarget-cpu` values that would alter the ABI are rejected as hard errors now.](rust-lang/rust#161280) <a id="1.100.0-Internal-Changes"></a> ## Other - [Test harness now allows passing `--test-threads` and `--color` multiple times, with later arguments overriding earlier ones](rust-lang/rust#161312) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2356 Reviewed-by: Thomas de Zeeuw <thomas@futo.org>
The v0.2.1 release run failed on both Windows targets with undefined _Unwind_* symbols from lld-link, so it never published. Zig 0.13.0 and cargo-zigbuild 0.24.1 were the same as for v0.2.0; Rust stable had moved from 1.99.1 to 1.100.0. Since 1.100 (rust-lang/rust#160712) rustc asks for a static libunwind on windows-gnullvm through `--unwindlib=libunwind -static-libgcc`, which zig cc 0.13 does not act on, and with -nolibc nothing supplies the unwinder. Passing `-C link-arg=-lunwind` makes zig build its bundled libunwind and link it statically. Reproduced locally with Rust 1.100.0, Zig 0.13.0 and cargo-zigbuild 0.24.1 (the same 11 undefined symbols), and fixed with the flag. Both x86_64 and aarch64 now link. The x86_64 exe imports exactly the DLLs the v0.2.0 exe does, with no libunwind.dll. The flag goes in as CARGO_TARGET_*_WINDOWS_GNULLVM_RUSTFLAGS on the build step and in scripts/build-release.sh, not in .cargo/config.toml, where it would also reach non-zig gnullvm toolchains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tz7qWLHGr5LKLeyzXi5C4F
View all comments
Previously shared library was used by default, meaning that programs and libraries couldn't be loaded if
libunwind.dllwas missing from the PATH. Using Wine (on Linux) because it better shows the problem (and is more convenient):Optionally libunwind could be linked statically via
+crt-static:After a discussion of approach in #159782 with @bjorn3 (thanks BTW!), I changed the proposed approach to always link static libunwind.
I don't have a good solution for #121794 that will resurface. I guess the user has three options:
libunwind.dll.aaslibunwind.a--unwindlib=none -lunwindto the linker argsI think the ease of use (not having to deal with additional DLL dependency) outweights the benefit of working with incomplete C toolchain.
The size bloat is also not a problem, sizes (in bytes) of the binary for the literal hello world project:
Debug diff +125.5 KiB, release diff: +40 KiB.
Size of
libunwind.dllthat has to be provided when linking shared libunwind: 204288 bytes (199.5 KiB).