4 ms·
There's already some toy OSes written in Rust: http://scialex.github.io/reenix.pdf http://scialex.github.io/reenix.pdf I think Rust IS able to replace C, preci
by GolDDranks 12y ago
There's already some toy OSes written in Rust: http://scialex.github.io/reenix.pdf http://scialex.github.io/reenix.pdf
I think Rust IS able to replace C, precisely for the same reason why Java and Go fail to do that: they have runtimes and they are garbage-collected. That means that you can't easily write a library in Java or Go and then call into that from another language without complicated interop and overhead. You can't write low-level code without headaches. Et cetera. Rust doesn't have a runtime, so it's like safe C++, for that matter.
- lloeki 12y ago> they have runtimes Go has as much a runtime as C or C++ [0]. [0]: http://en.wikipedia.org/wiki/Crt0 http://en.wikipedia.org/wiki/Crt0
- yoklov 12y agoMy understanding is you typically bootstrap the runtime for C/C++ when you write an OS. This is a significantly larger task for Go, to the point where I'd say it's probably infeasible (Is it possible to write the Go runtime in Go? Even the GC?).
- dbaupp 12y agoI don't think that's really true? Certainly Go has a much weighter runtime than those. Neither C nor C++ implicitly insert context switches into the runtime into the generated code, nor do they have garbage collectors that scan the processes memory.