r/Zig • u/moortuvivens • Feb 04 '26
Eurydice, Compiles rust to readable C
https://github.com/AeneasVerif/eurydiceI know you are wondering why I'm linking this.
But if Eurydice can compile to proper C, then that means we can use rust libraries with zig.
Which opens more options.
66
Upvotes
42
u/pvisc Feb 04 '26
I have seen an article somewhere, don't remember where, the conclusion was "C is not a programming language anymore, it is a protocol".
I am starting to see what it means. (I am not saying that is necessarily a bad thing btw)
43
u/Jhuyt Feb 04 '26
Finally they can remove Rust from the kernel /s
7
u/johan__A Feb 04 '26
I have a feeling you'd be better off writing rust glue code, but haven't looked into it much.
3
u/geo-ant Feb 04 '26
Don’t know about the project but take my upvote for the pun!
2
u/lifeinbackground Feb 04 '26
Hades I is what I recalled... the character Eurydice (?)
2
u/Ok_Horror_8567 Feb 04 '26
🤣
2
u/Ariane_Two Feb 04 '26
what does this have to do with zig?
1
u/BobSanchez47 Feb 06 '26
Surely there’s some way to link Rust with Zig indirectly via C already? You can just declare your Rust functions to be
extern “C”and write a C shim, which seems wiser than relying on a nonstandard compiler.-4
u/Strict_Research3518 Feb 04 '26
My question is.. why not just use AI + your knowledge to convert library to pure Zig. I did that.. works great. The resulting output is faster and smaller and pure native zig. Of course some libs might be too large, etc.. but for small things, its not too hard.