Skip to content

Move backtrace handling code to separate crate #39503

Closed
@Yamakaky

Description

@Yamakaky
Contributor

That way, third-party crates, like backtrace, could use the same code than the compiler. It uses things like std::io and std::env, so it should depend on std.
Waiting for #38165 before starting.

Activity

retep998

retep998 commented on Feb 3, 2017

@retep998
Member

As soon as the old makefiles are finally gone (#39431) Rust will be able to switch to using the external backtrace crate from crates.io.

Mark-Simulacrum

Mark-Simulacrum commented on May 20, 2017

@Mark-Simulacrum
Member

I think in order to use the external backtrace crate we'd have to make it capable of compiling with no_std; cc @alexcrichton (owner of the crate). However, I'm not very clear on the specifics here.

alexcrichton

alexcrichton commented on May 20, 2017

@alexcrichton
Member

Discussed on IRC with @Mark-Simulacrum, the thinking here is:

  • Add a no_std profile of compiling the backtrace crate, probably stripping out most of the APIs
  • Probably make all functions unsafe requiring explicit external synchronization
  • Likely twiddle with CFLAGS and such to make building in libstd appropriate

And otherwise land it!

Mark-Simulacrum

Mark-Simulacrum commented on May 20, 2017

@Mark-Simulacrum
Member

So I put up a trial run of a no_std backtrace-rs implementation (rust-lang/backtrace-rs#50) that technically compiles on macOS and x86_64, if probably doesn't work. After realizing that we'd have to vendor 2-3 new repos in order for this to happen today, we decided it's not time yet. As such, I'm unassigning myself -- but if anyone wants to take the PR and branch I put up and push it into completion that would be a good start for the future.

removed their assignment
on May 20, 2017
added
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Jun 23, 2017
added
E-help-wantedCall for participation: Help is requested to fix this issue.
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
on Jul 27, 2017
mati865

mati865 commented on Jun 12, 2019

@mati865
Member

@alexcrichton has #60852 fixed this issue?

alexcrichton

alexcrichton commented on Jun 12, 2019

@alexcrichton
Member

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @alexcrichton@retep998@mati865@Yamakaky@Mark-Simulacrum

        Issue actions

          Move backtrace handling code to separate crate · Issue #39503 · rust-lang/rust