Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Commit 75cde21

Browse files
committed
f
1 parent bccecd6 commit 75cde21

2 files changed

Lines changed: 30 additions & 14 deletions

File tree

bindings/rust/evmc-vm/src/lib.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,7 @@ pub trait EvmcVm {
1313
fn execute(&self, code: &[u8], context: &ExecutionContext) -> ExecutionResult;
1414
}
1515

16-
/// EVMC message (call) kind.
17-
pub type MessageKind = ffi::evmc_call_kind;
18-
19-
/// EVMC message (call) flags.
20-
pub type MessageFlags = ffi::evmc_flags;
21-
22-
/// EVMC status code.
23-
pub type StatusCode = ffi::evmc_status_code;
24-
25-
/// EVMC storage status.
26-
pub type StorageStatus = ffi::evmc_storage_status;
27-
28-
/// EVMC VM revision.
29-
pub type Revision = ffi::evmc_revision;
16+
pub mod types;
3017

3118
/// EVMC result structure.
3219
pub struct ExecutionResult {

bindings/rust/evmc-vm/src/types.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
use evmc_sys as ffi;
2+
3+
/// EVMC message (call) kind.
4+
pub type MessageKind = ffi::evmc_call_kind;
5+
6+
/// EVMC message (call) flags.
7+
pub type MessageFlags = ffi::evmc_flags;
8+
9+
/// EVMC status code.
10+
pub type StatusCode = ffi::evmc_status_code;
11+
12+
/// EVMC storage status.
13+
pub type StorageStatus = ffi::evmc_storage_status;
14+
15+
/// EVMC VM revision.
16+
pub type Revision = ffi::evmc_revision;
17+
18+
#[cfg(test)]
19+
mod tests {
20+
use super::*;
21+
22+
#[test]
23+
fn message_kind() {
24+
// assert_eq!(MessageKind::EVMC_CALL, ffi::evmc_call_kind::EVMC_CALL);
25+
// assert_eq!(MessageKind::EVMC_CREATE, ffi::evmc_call_kind::EVMC_CREATE);
26+
let x = MessageKind::EVMC_ISTANBUL;
27+
// assert_eq!(Revision::EVMC_ISTANBUL, ffi::evmc_revision::EVMC_ISTANBUL);
28+
}
29+
}

0 commit comments

Comments
 (0)