Cranston's Life - Rust and More Rust

What Rust Means to Me: HONOR!

This is a new installment in my series of writings that I am calling WHAT RUST MEANS TO ME.

As I continue to think about the nature of Rust and what it means to me, the next word I thought of was this: HONOR.

Why do I think that Rust exhibits HONOR?

I think that Rust is HONORABLE because it has INTEGRITY.

Rust strives to be the BEST that it can be.

Being the BEST does not mean being PERFECT, because Rust inhabits a world of limitation.

However I think it also means trying to be BETTER than it is right now, which is something I think that Rust does.

Not only does Rust improve over time, but Rust also forces me to IMPROVE myself.

I hold Rust to a high standard, and the Rust compiler holds ME to a high standard in return.

It does this by being HONEST with me, for if I have written POOR or FLAWED code then the Rust compiler will tell me!

While I do not believe that the Rust compiler is infallible, I do TRUST that it will be FAIR and JUST with my code.

Those are some reasons why I think that Rust shows HONOR.

DSP Programming With Rust!

The Rust programming language gets a lot of attention when it's used for programming web apps and network servers and compilers running on POWERFUL servers or desktops.

But we shouldn't neglect the SMALL and the EMBEDDED!

The Rust for Low Power Digital Signal Processing article by Cyril Fougeray gives us an EXAMPLE usage of Rust for DSP in the embedded world.

A "nRF52832 microcontroller on a PCA10040 development board" is the target used for the purpose of example in this article.

After the experimentation, the article describes a POSITIVE outcome wherein Rust may possibly be considered a suitable alternative to C for embedded programming such as DSP applications!

Rust Leaves Me Astounded!

It is rare for a Rust article to leave me ASTOUNDED but that is what has just happened when I read the Why Discord is switching from Go to Rust article!

I am in a state of DISBELIEF, but I also know that what I read is also VERY BELIEVABLE because Rust is involved.

The article tells how the Discord team discovered that a service written in Go was suffering from garbage collection induced performance PROBLEMS every 2 minutes!

Read the article for the whole story, but the main point to consider is that the service was rewritten in Rust.

Excerpts from the article will emphasize the important parts of this situation BETTER than I can:

  • "The latency of the Rust version was just as good as Go’s and had no latency spikes!"
  • "Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version."
  • "After a bit of profiling and performance optimizations, we were able to beat Go on every single performance metric. Latency, CPU, and memory were all better in the Rust version."

The metrics and graphs are IMPRESSIVE!

What an ASTOUNDING result that shows what Rust is capable of!

ASTOUNDING!

Simply ASTOUNDING!

Explaining the Why of Rust Code!

I like it when other programmers EXPLAIN their Rust code to me.

While I could read the Rust code for myself, having the author explain WHY it was written like it was is something I find to bring ENLIGHTENMENT.

The Implementing a Copyless Redis Protocol in Rust with Parsing Combinators article is just such an article that EXPLAINS to me why code was written like it was.

In that article, there is a description of a parser for the Redis Serialization Protocol that was written in Rust for the redis-oxide project.

Now I can STUDY and LEARN why the code is the way that it is.

Rust References!

Rust's ownership model is both a STRENGTH and a source of CONFUSION.

Understanding references can be part of the STRUGGLE of learning Rust, but reading Levi Notik's References and & in Rust article might just HELP one understand them better.

Although I am, and will always be, a LEARNER of Rust, I think I understand Rust's references.

But reading how others describe Rust language features is something I find USEFUL because it helps me REFINE my understanding.

I don't want to just KNOW the features of Rust.

I want to UNDERSTAND the features of Rust.