News for hackers. Stuff that matters.
Re:When Zig is safer and faster than Rust by swsieber on Tuesday March 07, 2023 @01:29PM (#35059096)
Here's one that does that: https://lib.rs/crates/inline-c

I'm not sure it's what you're looking for, but it seems like a good starting point.

As for the general thrust of your comment and the article, I agree. It'll be interesting to see what changes come to make things nicer.

Re:When Zig is safer and faster than Rust by zdimension on Tuesday March 07, 2023 @08:54PM (#35064174)
This one runs the C code as a program, so the code doesn't really communicate. I made a proof of concept some time ago of a macro that really translates C to Rust at compile time: https://github.com/zdimension/embed-c