3 ms·
This is true of a lot of languages, go, haskell (even more once shake becomes the build system for it) etc... It makes porting things... interesting.
by mitchty 9y ago
This is true of a lot of languages, go, haskell (even more once shake becomes the build system for it) etc...
It makes porting things... interesting.
- steveklabnik 9y agoUsually you port by cross compiling an initial compiler, and bootstrapping from there.
- binarycrusader 9y agoSpeaking from personal experience, that can be quite painful. Being able to build rust and cargo, even if only for bootstrapping when porting, would truly be a wondrous thing.
- fmap 9y agoWhy, we could always use emscripten to compile rustc to JavaScript and use that for bootstrapping! On a more serious note, ghc at least solved this problem by allowing you to compile Haskell to C (-fvia-C). Writing a naive C code generator from whatever your backend is using is probably not that hard.
- pjmlp 9y agoOr by making use of an interpreter as first stage.
- Kubuxu 9y agoGo bootstrap uses Go1.4 which compiler is written in C. So: compile Go1.4 and use that to compile the Go 1.X compiler (I don't know but multiple steps might be necessary).