Hacker News new | ask | show | jobs
by bbkane 373 days ago
And yet Rust in the one in the Linux and Windows kernels, so people must think it's worth the effort. https://threadreaderapp.com/thread/1577667445719912450.html is certainly a glowing recommendation
1 comments

Kernels are big pieces of software. Rust is used for device drivers mainly, right? So in that case you write an idiomatic rust lib and wrap it in a C interface and load it in.

Actually interfacing with idiomatic C APIs provided by an OS is something else entirely. You can see this is when you compare the Rust ecosystem to Zig; ie Zig has a fantastic io-uring library in the std lib, where as rust has a few scattered crates none of which come close the Zig's ease of use and integration.

One thing I'd like to see is an OS built with rust that could provide its own rusty interface to kernel stuff.

Hello can you point me to more information about zig's and rust's io-uring implementations
Hey Artix!

Zig's is in the standard library. From the commits it was started by Joran from Tigerbeetle, and now maintained by mlugg who is a very talented zig programmer.

https://ziglang.org/documentation/master/std/#std.os.linux.I...

The popular Rust one is tokio's io-uring crate which 1) relies on libc; the zig one just uses their own stdlib which wraps syscalls 2) Requires all sorts of glue between safe and unsafe rust.

github.com/tokio-rs/io-uring

thank you!
The OS is called Redox.
It actually provides rust APIs to dev systems software against that run on it?

I know it's written in rust, but I am talking more specifically than that.