Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/rust/evmc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn gen_bindings() {
.derive_hash(true)
// force deriving the PratialEq trait on basic types (address, bytes32)
.derive_partialeq(true)
.opaque_type("evmc_host_context")
.blocklist_type("evmc_host_context")
.allowlist_type("evmc_.*")
.allowlist_function("evmc_.*")
.allowlist_var("EVMC_ABI_VERSION")
Expand Down
5 changes: 5 additions & 0 deletions bindings/rust/evmc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

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

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

/// This is a void type given host context is an opaque pointer. Functions allow it to be a null ptr.
pub type evmc_host_context = ::std::os::raw::c_void;
Copy link
Member Author

@axic axic Jun 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this is the best option, given this is a completely opaque type, unless there is something like raw::intptr.


// TODO: add `.derive_default(true)` to bindgen instead?

impl Default for evmc_address {
Expand Down