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 Jun 24, 2020
1 parent 61f61a6 commit 885582b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bindings/rust/evmc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn gen_bindings() {
.rustified_enum("*")
// force deriving the Hash trait on basic types (address, bytes32)
.derive_hash(true)
.opaque_type("evmc_host_context")
.blacklist_type("evmc_host_context")
.whitelist_type("evmc_.*")
.whitelist_function("evmc_.*")
.whitelist_var("EVMC_ABI_VERSION")
Expand Down
7 changes: 6 additions & 1 deletion bindings/rust/evmc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(clippy::derive_hash_xor_eq)]

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: with bindgen's interface improving these may be moved to
// bindgen configuration

Expand Down

0 comments on commit 885582b

Please sign in to comment.