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

Convert the runtime to a crate #2377

Closed
brson opened this issue May 12, 2012 · 6 comments
Closed

Convert the runtime to a crate #2377

brson opened this issue May 12, 2012 · 6 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@brson
Copy link
Contributor

brson commented May 12, 2012

Converting the runtime to a Rust crate appears to be an interesting and useful thing to do.

Benefits:

  • It would have the same linkage rules as most of our libraries
  • Lets us exercise bindgen
  • It gives us the opportunity to use rustdoc and other tools with it
  • It would either simplify the makefiles or not make them worse

Cons:

  • Possible porting complications (I haven't considered it)

Guide to success:

@brson
Copy link
Contributor Author

brson commented May 12, 2012

This would end up meaning that you can't use rust without linking to another rust crate. That's a pretty large negative, sadly.

@graydon
Copy link
Contributor

graydon commented Jun 12, 2012

Why is it a negative? Seems ok to me.

@brson
Copy link
Contributor Author

brson commented Jun 12, 2012

I don't remember. I think because it makes porting harder since there are no standalone test cases.

@brson
Copy link
Contributor Author

brson commented Jun 24, 2012

After attempting to convert the runtime to a crate independent of core I now think it is appropriate (significantly easier) to just merge rt and core. The primary reason is that the runtime crate will have to export the entire runtime interface as Rust functions, and that will depend on Rust libc definitions. As more Rust runtime code is written, more of core will need to migrate to rt.

This will introduce the new limitation that it is not possible to compile rust code without linking to core.

@brson
Copy link
Contributor Author

brson commented Jun 24, 2012

This will also mean that no crate except for core can use native runtime functions directly (they will be internal to core). We currently have a number of test cases that use the runtime for testing native functions.

@brson
Copy link
Contributor Author

brson commented Sep 3, 2012

We're not doing this. Instead merging rt/core.

@brson brson closed this as completed Sep 3, 2012
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
Add test flag for running a test only on the host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

2 participants