mirror of
https://github.com/PiMaker/rvc.git
synced 2024-11-10 06:00:07 +00:00
64e2d0b45c
passes all RV32IM tests (run './test.sh all') instructions.txt is extracted from takahirox/riscv-rust
16 lines
395 B
Rust
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");
|
|
}
|