-
Notifications
You must be signed in to change notification settings - Fork 540
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
"Standard library (libstd, liballoc, libcore, libtest) guide" #123
Comments
You forgot liballoc, but yeah, I think this book should have a section about it somewhere. I just landed here to report that https://rust-lang-nursery.github.io/rustc-guide/tests/running.html does not show how to run |
I know nothing and must be doing everything wrong:
So I am more in the avoid touching any |
For example, I just wanted to run the |
Hmm... that's interesting. I do a lot of no_std stuff, and I don't recall liballoc or libcore taking more than a couple of minutes to compile (i5-7500T, 8GB RAM, SSD drive). I'm totally guessing, but
|
I have an SSD, I am running, for example,
I work on both, but I am willing to have two different |
I think this kind of makes sense. Since the compiler also uses these libraries, if you change one, you are changing a dependency of the compiler, which could in theory change the performance of the compiler or the code it produces. Perhaps using
IIRC, when I turned on rust.debug-assertions and llvm.assertions things got slow for me too (though, this was a while back...). Perhaps try turning them off? |
Does this section cover any of the things you wanted: https://rust-lang-nursery.github.io/rustc-guide/how-to-build-and-run.html#suggested-workflows-for-faster-builds-of-the-compiler |
That does look really nice. Thanks! |
Is there anything you think should be added to that section? |
The only thing that pops to mind is that I don't know how to use |
cc #78 "Bisecting against PRs" |
That's me, too. I recently learnt that part of the problem was a misunderstanding of the stages, so I was testing at stage 1 instead of stage 0: rust-lang/rust#57963 With regards to disk space, I wonder if it's possible reuse the LLVM part, for both disk usage and build time reasons: #276 |
As I mentioned on the other thread, a PR would be much appreciated. cc the related #201 |
The @kennytm Do you have an example for
|
Hi, is there any up-to-date info how to run quickly tests for stdlib or liballoc without bootstrapping the compiler? I'm not touching the compiler itself, I'd like just to have a quick sanity checks while developing stdlib APIs. I tried: |
@golddranks does this help? https://rust-lang.github.io/rustc-guide/how-to-build-and-run.html#suggested-workflows-for-faster-builds-of-the-compiler Otherwise, perhaps @Mark-Simulacrum has suggestions? |
That's your best bet command these days, but as you've noted it doesn't quite work if the bootstrap compiler you're using (typically beta) has diverged its test executable sufficiently from what we're using in-tree. When you say "I'm using a recent nightly (2019-10-03)." I'm not sure what you mean, x.py typically doesn't look in your environment for a rustc at all. You might be able to resolve this behavior by setting |
Ah, sorry, I meant that my default compiler (via |
Triage: closing. Now that https://github.com/rust-lang/std-dev-guide exists, we will no longer have the need to document standard library development in this guide. |
Some main points raised by rust-lang/rust#50466:
How to build and test the library without needing to rebuild the compiler every time.
./x.py test --stage 0 --no-doc src/libstd
to quickly build and test the standard library, if features from a pre-built compiler is sufficient.--keep-stage
syntax so the compiler will only be built once and then kept frozen?Code arrangement
src/libcore/tests/
The text was updated successfully, but these errors were encountered: