News for hackers. Stuff that matters.
Re:Rust's 2019 Roadmap by burfog on Tuesday April 23, 2019 @02:54PM (#19731645)
Do you know how difficult it is to write a position-independent blob that runs all by itself? Consider something like a boot loader or kernel, starting from a random location in memory. Can it run without needing assembly language?

For example, C can often do this. You ask the linker to put a particular function first and to make everything position-independent. There can be some problems with the GNU toolchain stubbornly insisting on making a GOT, but the language is otherwise fully capable.

Re:Rust's 2019 Roadmap by thenewwazoo on Tuesday April 23, 2019 @03:26PM (#19731982)
It's very easy, in fact. Because you don't use the stdlib, it requires handling some language items (the equivalent of having to write your own _start routine, for example). You set up vector tables just like normal, and you decorate things to tell the linker where to put them.

The canonical example is https://github.com/rust-embedded/cortex-m-rt if you want to get into the guts of how it works. For a more user-focused overview, check out https://github.com/rust-embedded/cortex-m-quickstart, which is a good starting point from which to drill down.