So long rust, why I built ZZ
aep.github.io
aep.github.io
There are articles with good criticism of Rust. This is not one of them.
> My company devguard was - by numbers of deployments - the largest user of rust
Numbers?
> is that we do stuff nobody can do.
> Sometimes rules have reasons, and sometimes you need to shut up and read the scientific papers of people who do in fact know better.
Zig and Odin are the two others that have appeared recently, at least of the ones I can immediately recollect (in addition to Rust, of course). I'll discount Jai as it's currently vaporware. Zig seems to be doing some really impressive stuff especially around target/libc management.
Zig and Odin are both trying to be a "better C", they don't try to prove safety (that's up to you) but they try to make it harder to shoot yourself in the foot (and may end up being simpler than Rust as a result).
I don't know much about Odin, but Zig has some very nice features to help embedded development:
- All standard library containers allow you to provide your own allocator (there is no magical central allocator, ie. the dreaded 'malloc').
- All errors must be handled, including running out of memory.
- It's easy to just not use the standard library at all.
- Cross-compiling is a breeze (eg. you can just build a Windows .exe on Linux as easily as building a Linux executable).
- You can measure frame sizes so you know how large your stack needs to be (and thus guarantee your stack will never overflow).
Certainly I'd be interested in anyone's 'Zig vs Odin' if they've used both.don't ever use Zig
There's some stuff in this post that I feel like I should address. I'm not gonna go line by line, though I could, because this will be long enough. Just gonna cover the highlights:
> My company devguard was - by numbers of deployments - the largest user of rust before we stopped using rust entirely.
I don't actually believe this is true. The link at the end has a slide that says "We shipped a quarter million devices with rust." This is certainly a big deployment, but if we just consider Firefox, Mozilla reports ~800,000 YAU, and about 250,000 MAU. I don't think this is a problem; I want people to have a good time with Rust, regardless of how big they are. But when summed up with all the other stuff, well... I only even mention this because it frames this article as "Rust's largest user is leaving."
> If you target anything else, you’ll be fighting upstream
There is no fight here. These architectures require help to support. This is how open source generally works. If the author wanted to pitch in, we would have loved the help.
We'll get back to this later.
> If you have no responsibility, you can prioritize fun over results
We take our responsibilities very seriously. If Rust were about fun, we wouldn't put so much work into stability, or performance, or anything else. This section reads mostly like an insult, so I'm not really going to get into the rest.
> The recent ecosystem break with async has put the nail in the coffin for us, because again they put the burden of actually making their poor design work on the community, again hiding the true runtime cost (TLS) away from the user while ignoring any prior work on the topic.
This has been a persistent issue with the author. He wrote his own coroutine + async io system. In the release announcement, (and on twitter) he made a number of factually incorrect statements about Rust and async/await. The largest of which that you could not use it on embedded, when that was a hard constraint on the design in the first place. TLS is not a true runtime cost, as I mentioned in a thread yesterday, async/await no longer uses TLS. This was always the plan; the initial implementation was shipped using TLS so that folks who didn't mind could get started using it. The author links to a blog post by Ferrous systems (another company using and selling a lot of Rust in the embedded space, incidentally) about how this was accomplished. It seems like this is saying that we forced other people to fix some sort of mistake. This is not the case; like any open source project, there was some work to be done, and someone did it. (I am not sure if this work was sponsored by Ferrous or not, I think it was.) I think this sort of ties back into the earlier bit about architectures; Rust is not a company, nor a foundation. We have no money. We cannot support everything internally. This is how open source works.
But even then... jschievink is on the teams. So this is the Rust team building the feature.
---------
Anyway, I wish him well with ZZ. It sounds like it's a better arrangement for all parties involved.
Missing digits?
Sorry about that :(
Archive.org link: https://web.archive.org/web/20200331134855/http://aep.github...
yes. well done for doing the right thing for your business.
> had to remove this again, because my random rants keep trending on hackernews, and really don’t have the time to write quality blog posts.
Would love it if he at-least left a non-emotional summary.