Re: Rust: kernel vs user-space

From: Rein Fernhout (Levitating) <me_at_levitati.ng>
Date: Wed, 04 Sep 2024 14:58:59 UTC
On 2024-09-04 11:09, Mark Delany wrote:
> As for user-space, I find the rationale for Rust as the 
> one-true-language-after-C far less
> compelling as many CLIs and server programs can just as well be written 
> in more accessible
> languages such as go or perl or java or...
> 
> Frankly I no longer write any CLI or server code in C even after 
> decades of doing so
> because the trade-off between development costs and performance is far 
> less compelling in
> user-space. If my once-a-week invocation of a command requires a bit 
> more memory and CPU
> than one written in C, is that really important compared to how much 
> easier the command is
> to maintain and enhance?

I actually prefer Rust for CLI programs these days.
The Clap argument parser allows you to parse command line arguments, 
with generated help and about pages, and autocomplete for various 
shells, which also supports autocompleting hostnames and the likes, all 
just by defining a structure.[0]

Rust can also use libc directly or bind to other C libraries and has a 
very strong standard library in general.

Otherwise I would personally reach for Ruby or Python.

[0]: https://docs.rs/clap/latest/clap/_derive/index.html