Status: works, v0.1.9
What's this?
Meet c_rs
. It is a fork of no longer maintained project.
This crate lets you write C code directly inside Rust.
GCC and rustc nightly are required!
So how do I use it?
Specify your Cargo.toml with
[]
= "https://github.com/mrMiiao/c_rs"
= "*"
= ["build"]
[]
= "https://github.com/mrMiiao/c_rs"
= "*"
= ["macro"]
And put this to Build.rs
extern crate c_rs;
Example of main.rs
extern crate c_rs;
use c_rs c;
use c_rs _void;
c!
extern "C"
You can find more examples here
Goals:
- Fix header linkage error
- Add local header support using "crate"
- Add ctypes