So long rust, why I built ZZ

栏目: IT技术 · 发布时间: 5年前

内容简介:My companySo that plus me not being subtle about it, leaves people to questionLet me first establish the context of what we do. Devguard is an embedded systems company. We primarily do IoT at massive scale with insane deadlines on impossibly cheap hardware

My company devguard was - by numbers of deployments - the largest user of rust before we stopped using rust entirely.

So that plus me not being subtle about it, leaves people to question their choice of rust. I’ll try to answer that as best as i can.

Let me first establish the context of what we do. Devguard is an embedded systems company. We primarily do IoT at massive scale with insane deadlines on impossibly cheap hardware. The reason devguard is a successful company without any sales or marketing people whatsoever, is that we do stuff nobody can do.

If you do x86 cloud based web services, rust is a good choice

So ask yourself: are you doing anything unusual? The rust strategy - like almost all large communities -  is very much prioritized by popularity, and if you do the thing with it that everyone does with it, the chances that it works are very high.

We at devguard do not do any of those things. Our biggest customer is mips custom chips, which is eternally broken on rust due to very novice toolchain design. rust has great support for building apps that work on linux, windows and mac. Very much like Qt. If you target anything else, you’ll be fighting upstream

If you have no responsibility, you can prioritize fun over results

Does your company or project have to make money? Does anyone die if your software fails? If it’s a startup or hobby, both of those are likely no, so you’re fine. Have fun, go rust.

Rust’s primary mission is to be empowering . What that vague mission statement in my experience means is that they’re welcome to newcomers. That’s a good thing for business, because hiring from an elitist community actually has higher development cost. Golang has the same idea, but Rob Pike comes with uncomfortable honesty

What it however also means is that they prioritize that over deep technical knowledge. Yes, coding can be fun, and I love seeing the creative ideas that come out of the maker community … at the maker fare, not in automotive emergency braking systems. Sometimes rules have reasons, and sometimes you need to shut up and read the scientific papers of people who do in fact know better.

If you have a cult, who cares about interoperability

My biggest and most personally frustrating complaint about rust is that it somehow became a purpose on its own, rather than a tool to do something. The developers are very isolated from the real world economic effects of their decisions. Somewhat on purpose i guess.

For example there’s a cognitive dissonance thing going on that rust has no runtime cost , because that’s what they advertise, and anyone finding workarounds for the actual very real runtime cost will feel the wrath of the cult , which sometimes ends up in acusing the offenders of not being politically correct enough.

Rust makes bold claims about being a system programming language, that is if you’re willing to build a new system around rust because all of the millions of dollars that chip vendors put in SDKs are somehow not usable

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.

Where do we go from here?

Is rust a bad language? no! Should you use it? yes!

That is unless you need to do anything commercial near hardware, then you should probably stay with the tools that have a huge amount of tooling to deal with exactly that. This is why i’m building zz . Drawing from rusts enthusiasm to make system programming less terrible, but also from decades of experience building hardware products at scale.

see also slides from rust and tell

The two main missions are:

  • make raw pointers safe at compile time
  • tie into the existing C ecosystem

We can finally have all those good tools that web service programmers have, but for real life embedded. Could you build web services with it? Probably, but I do think nodejs is the defacto standard there, which is why zz also compiles to nodejs modules automagically.

Essentially ZZ is a tool built with a narrow commercial purpose, integrating into existing ecosystems for economic efficiency. If that sounds boring, it’s because its in fact boring. Real work creating real value is usually boring.


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

算法设计与分析

算法设计与分析

陈慧南 / 电子工业出版社 / 2006-5 / 26.80元

《算法设计与分析:C++语言描述》内容分为3部分:算法和算法分析、算法设计策略及求解困难问题。第1部分介绍问题求解方法、算法复杂度和分析、递归算法和递推关系;第2部分讨论常用的算法设计策略:基本搜索和遍历方法、分治法、贪心法、动态规划法、回溯法和分枝限界法;第3部分介绍NP完全问题、随机算法、近似算法和密码算法。书中还介绍了两种新的数据结构:跳表和伸展树,以及它们特定的算法分析方法,并对现代密码学......一起来看看 《算法设计与分析》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具