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

Move backtrace handling code to separate crate #39503

Closed
Yamakaky opened this issue Feb 3, 2017 · 6 comments
Closed

Move backtrace handling code to separate crate #39503

Yamakaky opened this issue Feb 3, 2017 · 6 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-help-wanted Call for participation: Help is requested to fix this issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@Yamakaky
Copy link
Contributor

Yamakaky commented Feb 3, 2017

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.

@retep998
Copy link
Member

retep998 commented Feb 3, 2017

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
Copy link
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
Copy link
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 self-assigned this May 20, 2017
@Mark-Simulacrum
Copy link
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.

@Mark-Simulacrum Mark-Simulacrum removed their assignment May 20, 2017
@Mark-Simulacrum Mark-Simulacrum added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jun 23, 2017
@Mark-Simulacrum Mark-Simulacrum added E-help-wanted Call for participation: Help is requested to fix this issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Jul 27, 2017
@mati865
Copy link
Contributor

mati865 commented Jun 12, 2019

@alexcrichton has #60852 fixed this issue?

@alexcrichton
Copy link
Member

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-help-wanted Call for participation: Help is requested to fix this 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

5 participants