Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilizing panic_immediate_abort #115022

Closed
mwcampbell opened this issue Aug 20, 2023 · 6 comments
Closed

Stabilizing panic_immediate_abort #115022

mwcampbell opened this issue Aug 20, 2023 · 6 comments
Labels
-Zbuild-std Unstable Cargo option: Compile the standard library yourself. A-panic Area: Panicking machinery C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@mwcampbell
Copy link

Forgive me if there's already a tracking issue for this, but I haven't been able to find one. I see that the build script for the precompiled serde_derive binary uses this feature (and thus a nightly toolchain), so there's clearly demand for it. How can we users help get it stabilized?

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 20, 2023
@ChrisDenton
Copy link
Member

serde_derive is using the build-std feature. See: https://github.com/serde-rs/serde/blob/bfcd44704f847ac5a9f3072e102e803b5ebbef31/precompiled/build.sh#L12-L14

This is where the standard library is rebuilt instead of using the pre-built rlibs. It is unlikely that build-std is going to be stabilized any time soon but if you'd like to help out or track its progress then see https://github.com/rust-lang/wg-cargo-std-aware/issues

@ChrisDenton
Copy link
Member

That said, I would ask why you want it stabilized? There may be other designs that may achieve your goals.

For example, I have previously discussed with some devs that I'd love a way to turn off std backtraces and that whole machinery. Perhaps a rustc flag like -C backtrace=off, or maybe an attribute similar to global_alloc that allows plugging in your own backtrace stuff (which could just be a empty function). But I need to get round to writing up a proposal and figuring out the details.

@mwcampbell
Copy link
Author

A way to override the panic handler while still using std, as one can override the global allocator, would be good enough for me.

@Noratrieb Noratrieb added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs Relevant to the library team, which will review and decide on the PR/issue. -Zbuild-std Unstable Cargo option: Compile the standard library yourself. A-panic Area: Panicking machinery and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 22, 2023
@bjorn3
Copy link
Member

bjorn3 commented Aug 24, 2023

This can't be stabilized without also stabilizing rebuilding the standard library in the first place, which still has basic issues like trying to compile with panic = "abort" on a panic=unwind target being broken.

@ChrisDenton
Copy link
Member

Closing this as I think stabilizing build-std features are better tracked as part of that effort. Happy to reopen if people disagree.

@ruuda
Copy link
Contributor

ruuda commented Mar 2, 2024

Is there an issue I can subscribe to for staying up to date with the stabilization effort? I was able to find that build-std is part of https://github.com/rust-lang/wg-cargo-std-aware, but I don’t see an issue about panic_immediate_abort there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zbuild-std Unstable Cargo option: Compile the standard library yourself. A-panic Area: Panicking machinery C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants