proxmox-backup-qemu/build.rs
Dietmar Maurer 536e728645 improve docs
2019-10-15 15:16:07 +02:00

21 lines
509 B
Rust

// build.rs
extern crate cbindgen;
use std::env;
fn main() {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let header = std::fs::read_to_string("header-preamble.c").unwrap();
cbindgen::Builder::new()
.with_language(cbindgen::Language::C)
.with_crate(&crate_dir)
.with_header(header)
.generate()
.unwrap()
.write_to_file("proxmox-backup-qemu.h");
println!("cargo:rustc-cdylib-link-arg=-Wl,-soname,libproxmox_backup_qemu.so.0");
}