-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: small changes and add headers
- Loading branch information
1 parent
1f398ba
commit 20c29d5
Showing
16 changed files
with
1,881 additions
and
3,482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# cartesi-machine-sys | ||
|
||
This crate offers native bindings for the [cartesi emulator](https://github.com/cartesi/machine-emulator), enabling local manipulation of a Cartesi machine. | ||
This crate offers native bindings for the [cartesi emulator](https://github.com/cartesi/machine-emulator), enabling local manipulation of a Cartesi machine. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
use std::{env, path::PathBuf}; | ||
|
||
fn main() { | ||
println!("cargo:rustc-link-lib=cartesi"); | ||
|
||
let bindings = bindgen::Builder::default() | ||
.header("src/headers/machine-c-api.h") | ||
.generate() | ||
.expect("Unable to generate bindings"); | ||
|
||
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
bindings | ||
.write_to_file(out_path.join("bindings.rs")) | ||
.expect("Couldn't write bindings!"); | ||
} |
Oops, something went wrong.