Top
Best
New

Posted by peter_d_sherman 6 hours ago

Compiling Rust to readable C with Eurydice(lwn.net)
48 points | 6 comments
chias 29 minutes ago|
What an excellent choice of product name :D

"You're da C"

nfw2 7 minutes ago|
"you read da c"

Only know the pronunciation due to hadestown

Neywiny 4 hours ago||
I wish this covered more features specific to rust that make it more runtime safer not just compile time safer. I guess by the time it's IR it's the same but moving it back up to C would be nice to see. Like bounds checking.
Lvl999Noob 4 hours ago|
I think those are covered. Any checks that Rust adds will be present in the IR (either coded in the original source or implied through rust semantics). Those checks would then get put in the compiled C output. The ideal output of Eurydice would be to have exactly the same semantics and safety as provided by Rust. Since their use case is to use Rust to code on platform without support for a rust compiler, it is a rather important goal to have too.
fithisux 22 minutes ago||
D and C++ would benefit from something like this.
caniload 3 hours ago||
this reads more like karamel-for-rust than a general rust backend, which is probably the right framing. the hard part isn't syntax mapping, it's carrying ownership/borrow info out of mir so the generated c keeps the safety guarantees, and the readable requirement makes sense if the end goal is auditable crypto that drops into existing c codebases without a rust toolchain. curious how it handles the cases where rust and c disagree about aliasing
soltanov 2 hours ago|
[flagged]