2 ms·
> I usually find myself wishing I could have some macro where I just write in C and have it exposed as an unsafe back in Rust. In D you can just import a .c fi
by WalterBright 4y ago
> I usually find myself wishing I could have some macro where I just write in C and have it exposed as an unsafe back in Rust.
In D you can just import a .c file mycfile.c with:
import mycfile; // C file filled with C functions
and they'll be treated as @system code by the D semantics. They're even inlinable.