Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Rust Code for the Linux Kernel Updated with More Features Implemented (phoronix.com)
9 points by rbanffy on Aug 8, 2022 | hide | past | favorite | 10 comments



do we have a "production ready" rust compiler/linker toolchain written in rust?


The primary Rust implementation, https://github.com/rust-lang/rust, is written in Rust.


do we have bootstrap binaries? (x86_64, static ELF64(linux))

(to compile the rust-compiler from a rust compiler)


As far as i'm aware, the very first rust compiler was bootstrapped in C and the default rust compiler has since always been written in rust then compiled with its previous version.

above is "i'm pretty sure", but i _think_ the current rust compiler source has instructions on both how to build (with rust) and bootstrap (with C) it.


The initial versions of the Rust compiler we're written in OCaml.



And since then, development has continued on mrustc - it can now bootstrap Rust 1.54 directly (about 10 versions old as of now).


If you just want binaries, then yes, you just download rustc release binaries and use it to build itself.


Are they statically linked? (just need a few syscalls from the kernel and a basic ELF64 loader)


The rustc binary should run on any modern glibc distro by default and there is builds for other libc libraries too. It's not purely statically linked, it does run against glibc and pulls in a few other dynamic libraries, but most of those should be present if your system can show a TTY with a shell. I'd recommend using rustup to install the newest toolchain (and avoid pulling in an old one from your package manager, rustup can install older toolchains for you and manages it better than your distro with high probability)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: