zdimension/embed-c
View on GitHub ↗ ★ 217 Rust
Embed C code at compile time inside Rust using C2Rust
3 mentions on Hacker News by 2 people: 1 story, 2 comments · first 2022-02-25 · latest 2023-03-08
20082026
-
…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
comment by zdimension · 2023-03-08 · in Zig as an alternative to writing unsafe Rust -
Shameless self-plug: https://github.com/zdimension/embed-c This transpiles C to Rust at compile time, though it requires a nightly compiler and hasn't been updated in some time. But it's exactly what you're looking for. C code in, unsafe…
comment by zdimension · 2023-03-08 · in Zig as an alternative to writing unsafe Rust