
* Add a custom typed builder for Emulator * Unify qemu_init for usermode and systemmode * Remove env from qemu init args (it is unused in QEMU in practice) * expose thread hooks to systemmode * rename qemu_config to config * Replace ExitHandler by EmulatorDriver * Reorder generics alphabetically for Qemu{,Fork}Executor * Moved snapshot manager to Emulator to continue centralizing mains objects in the same structure * Reimplementation of CommandManager working with enums instead of tables * Macro has been adapted to do this work automatically * Moved snapshot stuff to dedicated module * Removed many Rc<RefCell<...>>, now useless with the removal of vtables * Builder given by Emulator via `Emulator::builder`. Reduced trait bound overhead
26 lines
749 B
Rust
26 lines
749 B
Rust
use std::{env, path::Path};
|
|
|
|
#[allow(clippy::too_many_lines)]
|
|
fn main() {
|
|
let out_dir = env::var_os("OUT_DIR").unwrap();
|
|
|
|
println!("cargo:rerun-if-changed=src/harness_wrap.h");
|
|
println!("cargo:rerun-if-changed=src/harness_wrap.cpp");
|
|
|
|
let build = bindgen::builder()
|
|
.header("src/harness_wrap.h")
|
|
.generate_comments(true)
|
|
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
|
|
.generate()
|
|
.expect("Couldn't generate the harness wrapper!");
|
|
|
|
build
|
|
.write_to_file(Path::new(&out_dir).join("harness_wrap.rs"))
|
|
.expect("Couldn't write the harness wrapper!");
|
|
|
|
cc::Build::new()
|
|
.cpp(true)
|
|
.file("src/harness_wrap.cpp")
|
|
.compile("harness_wrap");
|
|
}
|