digitalmars.D - Is it possible to implement a C backend for the D language
- electricface (11/11) Oct 25 2022 https://kristoff.it/blog/zig-self-hosted-now-what/
- FeepingCreature (5/16) Oct 25 2022 Neat also uses a C backend for bootstrapping.
- Walter Bright (2/2) Oct 26 2022 Yes, it's possible. One can take the intermediate code generated for the...
https://kristoff.it/blog/zig-self-hosted-now-what/ C backend We are also working on a special backend, one that produces C source code. Progress on the C backend has recently shot forward (87% and counting) thanks to an amazing contribution. What's interesting about this backend is that it will play a role in our plan to replace the old bootstrap compiler implementation and, perhaps even more interestingly, it will allow Zig to target architectures not supported by LLVM, including ones that force you to use a specific C compiler, like certain game console platforms.
Oct 25 2022
On Wednesday, 26 October 2022 at 01:47:29 UTC, electricface wrote:https://kristoff.it/blog/zig-self-hosted-now-what/ C backend We are also working on a special backend, one that produces C source code. Progress on the C backend has recently shot forward (87% and counting) thanks to an amazing contribution. What's interesting about this backend is that it will play a role in our plan to replace the old bootstrap compiler implementation and, perhaps even more interestingly, it will allow Zig to target architectures not supported by LLVM, including ones that force you to use a specific C compiler, like certain game console platforms.Neat also uses a C backend for bootstrapping. With DMD released from the need to stay C++ compatible for bootstrapping, you could even start using Phobos and slowly modernizing the codebase.
Oct 25 2022
Yes, it's possible. One can take the intermediate code generated for the dmd backend, and generated C with it instead.
Oct 26 2022