Versions: rustc 1.50 and rustc 1.52(nightly)
I followed the instructions on the install page of rust-land and ran rustup like this:
It downloaded a dozen of archives (megabytes) and installed rust in home under
Compiling rust from source
I used a Dell XPS 13 9350 and I compiled rust version 1.52, latest in the git repo with these commands:
x.py build took 1 hour and
/x.py install took 1.5 hour to finish.
I decided to try code coverage, it is an unstable feature:
- unstable compiler options are not available in the release version of rust (1.50)
- when I compile with the options
-Zinstrument-coverage=y, it fails to compile
The compile error I get is:
To fix this error, read the instructions in the nightly unstable documentation.
I compiled my code with
rustc -Cdebuginfo=2 to emit the full debug information.
I have gdb 10.0 installed on my machine and when I run
rust-gdb it starts gdb 10.0.
To debug, I use the command (my program is called
- when I put a breakpoint on main, it stops in
library/std/src/rt.rsand the function is
lang_start, it doesn't work as expected
- when I put a breakpoint on a statement in main and run, it stops on the correct line
In Rust by example, I read:
Reading the release notes, I notice there are many features that are unstable, deprecated or changing.
It means my source code needs to be tested for each new release of rust and then time needs to be spent to fix the issues.
If one decides to not fix the issues, the specific rust version for the source code has to be keep available and multiple version of rust might be needed.
As of today, the cost of using rust is far too high compare to the benifits it gives. The system is too unstable and the tools are not mature.