Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit b0c40df

Browse files
committed
rust: turn evmc_host_context instantiable
1 parent 4b78b32 commit b0c40df

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

bindings/rust/evmc-sys/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn gen_bindings() {
2424
.derive_hash(true)
2525
// force deriving the PratialEq trait on basic types (address, bytes32)
2626
.derive_partialeq(true)
27-
.opaque_type("evmc_host_context")
27+
.blacklist_type("evmc_host_context")
2828
.whitelist_type("evmc_.*")
2929
.whitelist_function("evmc_.*")
3030
.whitelist_var("EVMC_ABI_VERSION")

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

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

12+
// Defining evmc_host_context here, because bindgen cannot create a useful declaration yet.
13+
14+
pub type evmc_host_context = ::std::os::raw::c_void;
15+
16+
//pub struct evmc_host_context { }
17+
1218
// TODO: add `.derive_default(true)` to bindgen instead?
1319

1420
impl Default for evmc_address {

0 commit comments

Comments
 (0)