Skip to content
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

Implement higher-level result handling in EVMC Rust bindings #202

Merged
merged 1 commit into from
Mar 19, 2019
Merged

Conversation

jakelang
Copy link
Collaborator

@jakelang jakelang commented Mar 13, 2019

Part of #168.

@jakelang jakelang changed the title Implement higher-level result handling in EVMC Rust bindings Implement higher-level result handling in EVMC Rust bindings [WIP] Mar 13, 2019
@jakelang jakelang force-pushed the rust-api branch 2 times, most recently from 5fe308f to 57abc74 Compare March 13, 2019 15:10
@jakelang jakelang force-pushed the rust-api branch 2 times, most recently from ebe4596 to 8c6a7ce Compare March 13, 2019 18:34
@axic
Copy link
Member

axic commented Mar 13, 2019

I think this should have two use cases:

  1. Building a result object for data to be sent back from a VM execution
  2. Acquiring a result from a call to be used by the VM execution

For case 1) the VM will have a status code, data, gas left (and if it is a create - an address). I suggest we have a constructor for this case.

For case 2) we have a raw evmc_result pointer which we need to consume by wrapping it into an EvmcResult. When dropping the EvmcResult in this case, the underlying release must be called.

@chfast
Copy link
Member

chfast commented Mar 13, 2019

If you may, prefix you commits with rust:

@axic
Copy link
Member

axic commented Mar 14, 2019

Didn't we agree that the ExecutionResult instance has the data and address objects as Rust data structures (and not keep it boxed)?

@jakelang
Copy link
Collaborator Author

@axic Is this good for merge?

@axic axic merged commit 6cf62ae into master Mar 19, 2019
@axic axic deleted the rust-api branch March 19, 2019 19:21
@chfast
Copy link
Member

chfast commented Mar 24, 2019

Add it to CHANGELOG if there is anything to mention. You can push new CHANGELOG entry to master if convenient.

@axic
Copy link
Member

axic commented Mar 24, 2019

This code on its own is not that useful yet. Will add it to the changelog once we get #223 finished and merged.

@axic axic changed the title Implement higher-level result handling in EVMC Rust bindings [WIP] Implement higher-level result handling in EVMC Rust bindings Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants