rvc/elfy/build.rs
Stefan 64e2d0b45c initial commit
passes all RV32IM tests (run './test.sh all')

instructions.txt is extracted from takahirox/riscv-rust
2021-05-28 15:10:51 +02:00

16 lines
395 B
Rust

use std::env;
use std::path::PathBuf;
fn main() {
let crate_dir = PathBuf::from(
env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR env var is not defined"),
);
cbindgen::Builder::new()
.with_crate(crate_dir)
.with_language(cbindgen::Language::C)
.generate()
.expect("Unable to generate bindings")
.write_to_file("elfy.h");
}