Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed May 9, 2022
1 parent 2a98c22 commit 17bf67b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bindings/rust/evmc-loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ edition = "2018"

[build-dependencies]
bindgen = "0.59"
cmake = "0.1"
cmake = "0.1"
1 change: 1 addition & 0 deletions bindings/rust/evmc-loader/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn main() {
.rustified_enum("*")
.allowlist_type("evmc_.*")
.allowlist_function("evmc_.*")
.blocklist_type("evmc_vm")
// TODO: consider removing this
.size_t_is_usize(true)
.generate()
Expand Down
3 changes: 0 additions & 3 deletions bindings/rust/evmc-loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ pub fn load_and_configure(

#[cfg(test)]
mod tests {
use std::ffi::CString;
use std::os::raw::c_char;

use super::*;

#[test]
Expand Down
6 changes: 5 additions & 1 deletion bindings/rust/evmc-loader/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

// Defining evmc_vm here, because bindgen cannot create a useful declaration yet.

pub type evmc_vm = ::std::os::raw::c_void;

#[cfg(test)]
mod tests {
use std::ffi::CString;
Expand All @@ -21,7 +25,7 @@ mod tests {
unsafe {
let mut error_code = evmc_loader_error_code::EVMC_LOADER_UNSPECIFIED_ERROR;
let instance = evmc_load_and_create(c_str.as_ptr() as *const c_char, &mut error_code);
println!("{:?}", error_code);
println!("{:?} {:?}", error_code, instance);
}
}
}

0 comments on commit 17bf67b

Please sign in to comment.