top | item 34796401

(no title)

pitterpatter | 3 years ago

>By creating a standard, and allowing multiple implementations, someone creating a new OS or a new CPU architecture can create their own implementation of the language without having to wait for anyone else to deign to create the port.

Why does that require multiple implementations? There's nothing stopping said party from adding support for their OS/arch to rustc directly today. There are multiple examples of this already: fuchsia, Sony PSP, Nintendo Switch, etc [1]. Now if you want support in rustc itself out-of-the-box this does require LLVM support your target as well. But even then, again nothing stopping you from adding LLVM support too. The avr-rust project for instance maintained an LLVM/rustc fork for a while before those patches were upstreamed.

[1] See the wide variety of targets with varying support today: https://doc.rust-lang.org/nightly/rustc/platform-support.htm...

discuss

order

Karellen|3 years ago

Off the top of my head? Maybe you want to target a small system with a native compiler, so users of those systems don't have to cross-compile, but the standard implementation is just too big to run on those systems? (e.g. tcc)

Or maybe you don't want your work to be redistributed under the original project's license, and would prefer to have a copyleft/permissive/proprietary licensed version instead, which can still call itself a "real" implementation. (e.g. mono or gcj/openjdk. Or gcc, originally.)