80 points · by networked · 3y ago · 24 comments
The /dev/lua device, which allows interaction with the kernel interpreter: https://man.netbsd.org/lua.4
Presentation: https://www.netbsd.org/gallery/presentations/mbalmer/fosdem2...
Read the article, and you'll see the most glaring reason: Rust doesn't have an interpreter. Also, Rust isn't very portable, so that'd exclude a number of platforms on which NetBSD runs. Add that Rust is not lightweight in the least, and you can see why not Rust.
Also, Lua is much, much more relevant for uses like this, and suggesting that Rust is more mature is just... well, wrong. Lua has been around for ages and has matured quite well.
...you wanna talk about mature? Rust hit 1.0 in 2015 (https://blog.rust-lang.org/2015/05/15/Rust-1.0.html). Lua hit 1.0 in either 1993 or 94 (https://www.lua.org/history.html is a little fuzzy). As for reasons why Lua is suitable, and Rust is not even remotely suitable for anything core to NetBSD, the obvious one is platform support; NetBSD supports basically every platform to ever be capable of running a unix-like - https://netbsd.org/ports/ has a list. Rust supports... some of these, yes, but only a tiny fraction. Thus, Rust is wholly unsuitable (at this time) for any core component of NetBSD.
Also the Lua runtime is very small and its implementation readable, simple, and easily embedded.
I think of Lua as kind of filling the niche that BASIC did in the 80s.
See https://news.ycombinator.com/item?id=6562611 for a previous discussion.
Edit:See [2] for a presentation at FOSDEM 2012
[1] https://man.netbsd.org/lua.4 [2] https://www.netbsd.org/gallery/presentations/mbalmer/fosdem2...
https://github.com/smherwig/netbsd-sandbox
I really wish it was picked up more. NetBSD has a lot of innovative ideas and it is sad to see it go so forgotten and neglected.
I guess what NetBSD is after (preserving the heritage of the original / early Unixes from which it descends, keeping things simple and stable with minimal requirements while staying as platform agnostic as possible) is a bit of a niche, which also explains the small user base.
More users favor simplicity of usage rather than technical simplicity, run powerful aarch64/amd64 machines rather than exotic / constrained hardware, and are more after the "move fast" model than after long term technical stability and consistency. A large "frenetic" project like Linux simply suits those users better.
The author of the linked post, JuvenalUrbino, contributes a great deal imo.