This is different from C++ where each individual source file can be compiled in parallel, so it's something I had to re-learn.
OTOH there might be a benefit too as more code becomes re-usable in independent crates.
That's... not the same thing at all.
Rust lets you have multiple crate in a single workspace, which allows parallelising the build (because crates are the concurrency unit of building rust).
That's got nothing whatsoever to do with pulling random crates, which is a separate issue.
* Python TYPE_CHECKING https://adamj.eu/tech/2021/05/13/python-type-hints-how-to-fi...
* C/C++ header files
But regardless, there is too much Rust code in existence to change this now.
The problem in the JS ecosystem is not the number of dependencies, but the number of entities you have to trust. There is no real difference between having one big crate in a repo managed by one entity or fifteen small crates in a repo managed by one entity.
https://blog.llvm.org/2019/09/closing-gap-cross-language-lto...
Heh
Impossible to tell without knowing more. Steps to reproduce the issue would help. Just consider how TFA went through many different things to investigate.
> Does it really need to waste so much of my time to change a single byte in the output binary?
Does it actually only change a single byte in the binary? Changing a single value can cascade much further than that.
It was a rhetorical question based off my experience with rust. I was running into this issue with building a site using warp along with some other dependencies. Those projects have been deleted off my system. I am not interested in chasing down performance issues with the compiler. Remaking the site using C++ did not have me run into slow compile times. I just want to be able to quickly iterate on stuff I work on.
>Does it actually only change a single byte in the binary?
It would be possible. I could do it myself using binary ninja / ghidra. I just want to be able to iterate quickly and try out multiple different values. I understand it's not that simple of a problem, but I just want it to work else I'll gravitate to making projects in some other language.
Sounds like Go or C++, or maybe evne Zig, are good choices for you then
It is indeed very frustrating trying to play with these kind of "settings" values.
Just by having cargo support binary libraries would be an improvement for cold builds, but I understand it isn't a priority.
The Rust/WinRT folks have a big binary crate that they use to workaround Rust's compilation times, https://github.com/microsoft/windows-rs/tree/master/.windows
I also like programming in Rust without a linter.
It really makes me think about what it is I'm doing. I do not have the luxury of typing something down, compiling it, and running it after every change to see: "does it work now?"
To be fair, that's only in my personal projects. I understand this is a major issue in the "ship it quickly -- everything else be damned" environment of commercial programming, where one must rely on all these aides to get something reasonably done in a reasonable amount of time.
It was a major headache when I first learned the language, because the syntax is so rigid and exacting; but it did force me to really understand the language, instead of just being able to throw shit at the wall and consult technical docs everytime I wanted to do something.
Now, I can still do the same, but that's after spending years using a particular language or ecosystem.
I wouldn't want to go back to writing code on paper without docs, but it definitely made you think differently when it came to both writing code and learning. Kind of like how when you had a question about something before the internet, you had to stew with it until you could answer it yourself, or until you met someone who could answer your question, or you did your own research. Now, I can take out my phone and answer most questions within 20 seconds.
Individual files won't be faster but it's been a wonder for whole project compilations
My 2 main gripes with Bazel was that it was a pain having to rewrite the build system for all of my dependencies and that it's claim of being reproducible is weak in the sense that there are not even warnings when you use resources from the base system (eg. compilers can include files from the base system which may not be the same / exist on another) (this is a problem since I wanted to use a header from the dependency I built with Bazel and not something already on my system)
This does disable multiplex workers,.which can make it more memory intensive. Working on that.
I don't know exactly what I tried since this was maybe a year and a half ago. I tried asking on their slack, but I think I was told that it was not possible. I don't have the project around anymore to try out your suggestion.
Or even better, a massive Rust monorepo orchestrated with Bazel build?
Android uses Soong for Rust,
https://source.android.com/setup/build/rust/building-rust-mo...
While Fucshia uses GN with Rust,
https://fuchsia.dev/fuchsia-src/development/build/concepts/b...