Re:Booting to Rust
by aray on Tuesday November 19, 2013 @02:10AM
(#6759705)
Nice writeup! It's interesting to see the similarities between Booting to Rust and booting Go on baremetal.
[ Parent
| on HN ]
You can't say something interesting like that without a link to a Go example for the rest of us to see the similarities too. :)
Well, there's this: http://code.google.com/p/gofy/
I was interested in this as well and found this commit[1] by Russ Cox. README has details on running it inside bochs.
Other commenters beat me to the first two examples, though there's more.
GoFY (which hilariously I'm a contributor on) was probably the closest analogy; it booted on x86. Russ Cox's did as well, but it was removed from the go tree years ago when it bitrotted.
Really it boils down to 1) custom linker scripts/targets and 2) a custom "OS" target that emulates syscalls/etc
I've done it a couple times (on ARM-based embedded devices), I end up throwing it out every time. Should get a proper writeup I suppose.