-
Notifications
You must be signed in to change notification settings - Fork 164
Frequently Asked Questions
Rust currently lacks a full language specification. The Sealed Rust project by Ferrous Systems (https://ferrous-systems.com/blog/sealed-rust-the-pitch/) is the first step in that direction. If Rust-GCC can help with that, we're happy to work together and move the formal specification forward.
Until this happens, rustc and The Rust Reference will be used as the specification for Rust-GCC development.
If GCC Rust interprets a program differently from rustc this is considered a bug (at this stage of the project). Once Rust-GCC can compile and verify all Rust programs, this can also help figure out inconsistencies in the specification of features in the language.
GCC could have been added to rustc as a new backend akin to cranelift using the GCC's new JIT interface. Adding GCC just as a backend to rustc would still keep it external to GCC and the GCC community. LLVM and GCC coexisting showed that those are culturally different groups. Adding a front end to GCC rather than a backend to rustc, we hope to get a second community invested in Rust, instead of putting more burden on the already significant Rust community.
The front-end could have leveraged the existing Rust code base and wrote bindings back to GIMPLE. Rustc MIR is currently unstable, which leaves a question to the level of stability in lowering MIR to GIMPLE with successive releases of both GCC and Rust. Nevermind a difficult bootstrapping problem in terms of the version of rustc supported for each release of GCC and regression testing of the GCC maintainers' front-end.
We are aware of this. Borrow checking, for example, is planned to be implemented once the basics are there. In the current state, macros are not yet supported. So there is a long way until features like Async/Await or const generics will be implemented.
We hope that with the announcement from Open Source Security, inc and Embecosm hiring Philip Herron for one year to bootstrap the project will get the core of the compiler in place and attract further resourcing.