Re:Mrustc: a Rust compiler written in C++
by andrewflnr on Thursday September 21, 2017 @10:03PM
(#15308893)
Exactly. There's no reason a compiler should take any input but the source (maybe some config) nor have any output but the translated code. There's no dependence on running on a particular piece of hardware in this equation. Just run the codegen for platform Y on platform X.
[ Parent
| on HN ]
Re:Mrustc: a Rust compiler written in C++
by coldtea on Friday September 22, 2017 @04:15AM
(#15310255)
Wouldn't it need to link to native libraries, and thus require you to have all those around too?
Re:Mrustc: a Rust compiler written in C++
by andrewflnr on Friday September 22, 2017 @09:02PM
(#15317384)
Sure, I guess in the 10,000 foot view those look like source code :). But there's no fundamental reason you can't have libraries for platform X merely present on a platform Y system, it's just inconvenient today. That's the point I'm really trying to get at.