💾 Archived View for gmi.noulin.net › 2021-02-20-trying-rust.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
date: 2021-02-20 15:36:20
categories: programming
firstPublishDate: 2021-02-20 15:36:20
Versions: rustc 1.50 and rustc 1.52(nightly)
I followed the instructions on the
and ran rustup like this:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
It downloaded a dozen of archives (megabytes) and installed rust in home under `~/.cargo/bin`.
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 ./x.py install
`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:
The compile error I get is:
error[E0463]: can't find crate for `profiler_builtins` | = note: the compiler may have been built without the profiler runtime error: aborting due to previous error For more information about this error, try `rustc --explain E0463`.
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 `h`):
rust-gdb -tui h
In Rust by example, I read:
Since Rust 1.45, the `as` keyword performs a *saturating cast* when casting from float to int.
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.