3 ms·
Is it LLVM IR --> C? Or Rust AST to C?
by dilawar 2y ago
Is it LLVM IR --> C? Or Rust AST to C?
- dilawar 2y agoFound the answer in the project readme. > My representation of .NETs IR maps nicely to C, which means that I was able to add support for compiling Rust to C in 2-3K LOC. Almost all of the codebase is reused, with the C and .NET specific code only present in the very last stage of compilation
- nickpsecurity 2y agoWhich might also allow one to use tools that work on .NET bytecode. They include verification, optimization, debugging, and other transpilers. You might also get a grant or job offer from MS Research. :)
- epage 2y agoIt is a rustc backend, ie an alternative to llvm, gcc, or the cranelift backends. It started as a .NET backend but they found that their approach could easily support C code generation as well so they added that. They do this by turning what rustc gives them into their own IR.