Skip to content

Commit

Permalink
rust: turn evmc_host_context instantiable
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed May 6, 2022
1 parent a1d2845 commit c1945c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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
6 changes: 6 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,12 @@

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

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

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

//pub struct evmc_host_context { }

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

impl Default for evmc_address {
Expand Down

0 comments on commit c1945c5

Please sign in to comment.