💾 Archived View for gmi.noulin.net › 2021-02-20-trying-rust.gmi captured on 2022-03-01 at 15:18:26. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

➡️ Next capture (2023-01-29)

🚧 View Differences

-=-=-=-=-=-=-

Trying rust

Feed

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)

Installing rust

I followed the instructions on the

install page of rust-land

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`.

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
./x.py install

`x.py build` took 1 hour and `/x.py install` took 1.5 hour to finish.

Code coverage

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

.

Debugging

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

Stability

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.

Conclusion

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.

hashtags: #rust

Feed