Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd actually love to ask Linus' on his opinion of the practical uses of Rust in the Linux kernel. Does he think it could have a place, if not, why? Can those issues be addressed, etc?

Even if that means him dismissing me/my question entirely lol.



I gather LLVM has too few backends, and fewer quality ones, to be suitable for such a general purpose OS.

As I recall Rust is currently targeting only Intel and ARM backends.

And it's way too early to see if it'll make it.


Rust seems very promising language , but why on earth should any one use rust in kernel development ? as far as I see this link is just calling write system call from rust program (which is very good) , but don't have anything to do with linus or kernel internal. and if you mean some thing like scripting in kernel ( i think openbsd ddne it with lua ) there is more viable and simpler choice than rust , like lua.


> but why on earth should any one use rust in kernel development

Because that's explicitly one of the things Rust was developed for.

Here's a whole list of kernels and other OS projects that have been created using Rust:

https://github.com/rust-lang/rust/wiki/Operating-system-deve...


Because it allows (in some situations) dynamic memory allocation where the compiler can reason about when the memory becomes unused, thus guaranteeing that it's freed. In other words, you get to use algorithms which allocate off the heap without risking a memory leak. Plus a whole bunch of other useful features like Lisp-style structural macros, parametric polymorphism, compile time bounds checking, and other awesome stuff stolen from the functional programming world.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: