Hacker News new | past | comments | ask | show | jobs | submit login

> I was working on Cranelift, the WebAssembly compiler that is also a plausible future backend for Rust debug mode.

Just curious, but could Cranelift (or rustc_codegen_cranelift, I'm not sure which would be the closest) also acquire a C-transpiling backend, making it a viable replacement for mrustc? There might be quite a few people willing to fund that sort of work, since it could suffice to bring Rust to a whole lot of platforms that people care about.




Yes, it's plausible that were Rust to adopt Cranelift as a supported backend, you could use Cranelift as an intermediary to translate Rust MIR (via Cranelift CLIF) into C. Outputting functional-but-horrifying C would not be terribly difficult.

The CLIF format is low level but relatively architecture-independent.


Sorry for question, but will you continue work on adopt it to Rust?





Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: