From fbba2538e1c178c9ffa2ed0e3b6ff5b7364706ee Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 6 Jun 2019 00:26:48 +0200 Subject: [PATCH] rust: add support for the precompiles capability --- bindings/rust/evmc-declare/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/rust/evmc-declare/src/lib.rs b/bindings/rust/evmc-declare/src/lib.rs index 1b29526..9deaf8c 100644 --- a/bindings/rust/evmc-declare/src/lib.rs +++ b/bindings/rust/evmc-declare/src/lib.rs @@ -166,8 +166,9 @@ impl VMMetaData { let mut ret: u32 = 0; for capability in capabilities_list_pruned.split(",") { match capability { - "ewasm" => ret |= 0x1 << 1, - "evm" => ret |= 0x1, + "evm" => ret |= 1, + "ewasm" => ret |= 1 << 1, + "precompiles" => ret |= 1 << 2, _ => panic!("Invalid capability specified."), } }