mirror of https://github.com/status-im/evmc.git
Merge pull request #320 from ethereum/rustdoc
rust: add more comments/rustdoc
This commit is contained in:
commit
9d3fc6fa21
|
@ -308,7 +308,7 @@ fn build_create_fn(names: &VMNameSet) -> proc_macro2::TokenStream {
|
|||
}
|
||||
}
|
||||
|
||||
/// Builds a callback to dispose of the VM instance
|
||||
/// Builds a callback to dispose of the VM instance.
|
||||
fn build_destroy_fn(names: &VMNameSet) -> proc_macro2::TokenStream {
|
||||
let type_ident = names.get_type_as_ident();
|
||||
|
||||
|
@ -321,6 +321,7 @@ fn build_destroy_fn(names: &VMNameSet) -> proc_macro2::TokenStream {
|
|||
}
|
||||
}
|
||||
|
||||
/// Builds the main execution entry point.
|
||||
fn build_execute_fn(names: &VMNameSet) -> proc_macro2::TokenStream {
|
||||
let type_name_ident = names.get_type_as_ident();
|
||||
|
||||
|
@ -361,6 +362,7 @@ fn build_execute_fn(names: &VMNameSet) -> proc_macro2::TokenStream {
|
|||
});
|
||||
|
||||
let result = if result.is_err() {
|
||||
// Consider a panic an internal error.
|
||||
::evmc_vm::ExecutionResult::new(::evmc_vm::ffi::evmc_status_code::EVMC_INTERNAL_ERROR, 0, None)
|
||||
} else {
|
||||
result.unwrap()
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
* Licensed under the Apache License, Version 2.0.
|
||||
*/
|
||||
|
||||
//! Rust bindings for EVMC (Ethereum Client-VM Connector API).
|
||||
//!
|
||||
//! Have a look at evmc-declare to declare an EVMC compatible VM.
|
||||
//! This crate documents how to use certain data types.
|
||||
|
||||
mod container;
|
||||
|
||||
pub use container::EvmcContainer;
|
||||
|
|
Loading…
Reference in New Issue