rust: add more comments/rustdoc

This commit is contained in:
Alex Beregszaszi 2019-06-04 15:26:47 +01:00
parent 88f2a1dae7
commit 092356dabb
2 changed files with 8 additions and 1 deletions

View File

@ -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()

View File

@ -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;