←back to thread

Eurydice: a Rust to C compiler

(jonathan.protzenko.fr)
185 points todsacerdoti | 1 comments | | HN request time: 0.375s | source
Show context
bloppe ◴[] No.46180140[source]
Rust compiles to LLVM IR. I'm pretty surprised that building this transpiler was considered a better use of time than writing an LLVM backend for whatever "weird embedded target" might need this.
replies(9): >>46180523 #>>46180571 #>>46180649 #>>46180773 #>>46180810 #>>46181523 #>>46184598 #>>46185313 #>>46189858 #
Bratmon ◴[] No.46185313[source]
I think you may not be familiar with how embedded development works.

Most teams who write code for embedded devices (especially the weird devices at issue here) don't have the hardware knowledge, time, or contractual ability to write their own compiler backend. They're almost always stuck with the compiler the manufacturer decided to give them.

replies(2): >>46185418 #>>46185597 #
1. aw1621107 ◴[] No.46185418[source]
I think the approach would not be to alter the manufacturer's compiler directly, but to run your Rust code through a separate Rust-to-C compiler then feed that output into the compiler the manufacturer gave you.