Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Commit 17bf67b

Browse files
committed
f
1 parent 2a98c22 commit 17bf67b

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

bindings/rust/evmc-loader/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ edition = "2018"
1313

1414
[build-dependencies]
1515
bindgen = "0.59"
16-
cmake = "0.1"
16+
cmake = "0.1"

bindings/rust/evmc-loader/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ fn main() {
2727
.rustified_enum("*")
2828
.allowlist_type("evmc_.*")
2929
.allowlist_function("evmc_.*")
30+
.blocklist_type("evmc_vm")
3031
// TODO: consider removing this
3132
.size_t_is_usize(true)
3233
.generate()

bindings/rust/evmc-loader/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ pub fn load_and_configure(
2828

2929
#[cfg(test)]
3030
mod tests {
31-
use std::ffi::CString;
32-
use std::os::raw::c_char;
33-
3431
use super::*;
3532

3633
#[test]

bindings/rust/evmc-loader/src/sys.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

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

11+
// Defining evmc_vm here, because bindgen cannot create a useful declaration yet.
12+
13+
pub type evmc_vm = ::std::os::raw::c_void;
14+
1115
#[cfg(test)]
1216
mod tests {
1317
use std::ffi::CString;
@@ -21,7 +25,7 @@ mod tests {
2125
unsafe {
2226
let mut error_code = evmc_loader_error_code::EVMC_LOADER_UNSPECIFIED_ERROR;
2327
let instance = evmc_load_and_create(c_str.as_ptr() as *const c_char, &mut error_code);
24-
println!("{:?}", error_code);
28+
println!("{:?} {:?}", error_code, instance);
2529
}
2630
}
2731
}

0 commit comments

Comments
 (0)