-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust: turn evmc_host_context into a void type #524
Conversation
bindings/rust/evmc-sys/src/lib.rs
Outdated
|
||
pub type evmc_host_context = ::std::os::raw::c_void; | ||
|
||
//pub struct evmc_host_context { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also just implement Default on this.
|
||
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; |
There was a problem hiding this comment.
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
.
@CaptainVincent do you want to make a PR so we can discuss it? |
Done. #527. (Include evmc-client and workaround) |
@vorot93 this is an old outstanding change, but do you have any suggestion? What bindgen generates is the following: #[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_host_context {
_unused: [u8; 0],
} We want something what can be "instantiated". |
Codecov Report
@@ Coverage Diff @@
## master #524 +/- ##
=======================================
Coverage 92.86% 92.86%
=======================================
Files 23 23
Lines 3546 3546
Branches 375 375
=======================================
Hits 3293 3293
Misses 144 144
Partials 109 109 |
This may be needed for #476.