Cranston's Life - Rust and More Rust

What Rust Means to Me: BRAVERY!

I am starting a new series of writings that I think I will call WHAT RUST MEANS TO ME.

As I started to think about Rust and what it means to me the first word that I thought of was this: BRAVERY.

Why do I think that Rust exhibits BRAVERY?

I think that Rust is BRAVE because it takes chances in order to try to be a BETTER language.

Rust will try NEW approaches, even if there is the risk of them not working or not being accepted by programmers.

Rust pushes the BOUNDARIES of what a programming language is expected to be and what it is expected to do, even when naysayers say it cannot be done!

Rust is the kind of programming language that is ready to face any CHALLENGE that comes its way.

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

A Reminder About the Power of Macros!

Compiling source code can be a FRUSTRATING source of delays under normal circumstances, but sometimes there are VERY FRUSTRATING situations like described in the 5 hours to compile macro, what can I do? question!

The PROBLEM is described like this: "I have a very large macro instantiation, which takes 4 or 5 hours to compile with Rust 1.40, so I'm looking to improve this unreasonably long build time."

A list of attempts to diagnose and remedy the PROBLEM is given.

Luckily, there is an accepted SOLUTION!

5 HOURS to compile some Rust source code!

What a SITUATION!

This ordeal reminds me about the POWER of macros, in both GOOD ways and BAD ways!

Macros are a tool to be used with GREAT CARE!

They can be a source of immense CONVENIENCE, allowing GREAT THINGS to be achieved.

But as this situation shows, they can CHALLENGE a compiler in unimaginable ways.

I must study this PROBLEM in more detail.

A Soundness Pledge for Rust?

Raph Levien has posted The Soundness Pledge article.

That article gives some INSIGHTS about unsoundness, and undefined behavior, and the unsafe keyword in Rust.

The role of unsafe in Rust and WHEN it should be used and HOW it should be used is considered.

To set expectations for users it is proposed that Rust library authors could PLEDGE that they intend their libraries to be free of soundness bugs and that they welcome help to achieve that.

It is thought that may Rust library authors WOULD make such a pledge, but some WOULD NOT and that is OK.

To my knowledge the point of the pledge would be to let users KNOW the library authors' stance.

Maybe there are cases in REAL WORLD code where unsafe Rust is needed, and is justified, and is used with such great care.

If such a pledge would bring CLARITY to programmers using a library then I can see VALUE in it.

I must keep this proposed pledge in my mind if I am ever a Rust library AUTHOR.

So Much Rust Drama!

I don't know specifically what happened but there was some BIG DRAMA recently about some Actix project.

It is not software that I have used but to me it looks like some kind of web framework for Rust.

From what I have gleaned the lead programmer of the project suddenly decided to STOP working on it after a contentious bug report was filed, and posted a postmortem essay.

There is MUCH chatter at Reddit about this incident like Actix-net unsoundness patch "is boring" and actix_web repository cleared by author who says he’s done with open source, and some chatter at Hacker News, too.

Steve Klabnik wrote the A sad day for Rust article about this INCIDENT.

Steve's article resulted in some BIG DISCUSSION at Hacker News and Reddit.

I am SHOCKED by how much DRAMA was generated by this situation!

There has been so much COMMENTING about it, even including my very own commenting about it right here!

But this is a LESSON for me.

I must focus on the PROGRAMMING and not let myself be distracted by COMMUNITY DRAMA.

I must focus on the PROGRAMMING!