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

Commit e47280b

Browse files
committed
rust: turn evmc_host_context into a void type
1 parent 1982c04 commit e47280b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

bindings/rust/evmc-sys/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn gen_bindings() {
1919
.derive_hash(true)
2020
// force deriving the PratialEq trait on basic types (address, bytes32)
2121
.derive_partialeq(true)
22-
.opaque_type("evmc_host_context")
22+
.blocklist_type("evmc_host_context")
2323
.allowlist_type("evmc_.*")
2424
.allowlist_function("evmc_.*")
2525
.allowlist_var("EVMC_ABI_VERSION")

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

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

11+
// Defining evmc_host_context here, because bindgen cannot create a useful declaration yet.
12+
13+
/// This is a void type given host context is an opaque pointer. Functions allow it to be a null ptr.
14+
pub type evmc_host_context = ::std::os::raw::c_void;
15+
1116
// TODO: add `.derive_default(true)` to bindgen instead?
1217

1318
impl Default for evmc_address {

0 commit comments

Comments
 (0)