Hacker GitHub

← All repos

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

Mentions per year 3 mentions · busiest year 2023 (2)
20082026
  1. …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
  2. 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