Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 17cc827

Browse files
authored
Merge pull request #462 from ethereum/rust-deps
rust: update dependencies
2 parents 23ad3c5 + 2b5cd5a commit 17cc827

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning].
1919
[#444](https://github.com/ethereum/evmc/pull/444)
2020
- In the C++ `HostInterface` the logically read-only methods are marked with `const`.
2121
[#461](https://github.com/ethereum/evmc/pull/461)
22+
- Updated dependencies of the Rust bindings to latest stable versions.
23+
[#462](https://github.com/ethereum/evmc/pull/462)
2224

2325

2426
## [7.0.0] „Istanbul Ready” — 2019-11-11

bindings/rust/evmc-declare/Cargo.toml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,12 @@ description = "Bindings to EVMC (VM declare macro)"
1212
edition = "2018"
1313

1414
[dependencies]
15-
quote = "0.6.12"
15+
quote = "1.0"
1616
heck = "0.3.1"
17-
proc-macro2 = "0.4.29"
18-
17+
proc-macro2 = "1.0"
18+
syn = { version = "1.0", features = ["full"] }
1919
# For documentation examples
2020
evmc-vm = { path = "../evmc-vm" }
2121

22-
[dependencies.syn]
23-
version = "0.15.33"
24-
features = ["full"]
25-
2622
[lib]
2723
proc-macro = true

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ use syn::parse_macro_input;
4141
use syn::spanned::Spanned;
4242
use syn::AttributeArgs;
4343
use syn::Ident;
44-
use syn::IntSuffix;
4544
use syn::ItemStruct;
4645
use syn::Lit;
4746
use syn::LitInt;
@@ -126,7 +125,7 @@ impl VMMetaData {
126125
let vm_version_meta = &args[2];
127126

128127
let vm_name_string = match vm_name_meta {
129-
NestedMeta::Literal(lit) => {
128+
NestedMeta::Lit(lit) => {
130129
if let Lit::Str(s) = lit {
131130
// Add a null terminator here to ensure that it is handled correctly when
132131
// converted to a C String.
@@ -141,7 +140,7 @@ impl VMMetaData {
141140
};
142141

143142
let vm_capabilities_string = match vm_capabilities_meta {
144-
NestedMeta::Literal(lit) => {
143+
NestedMeta::Lit(lit) => {
145144
if let Lit::Str(s) = lit {
146145
s.value().to_string()
147146
} else {
@@ -170,7 +169,7 @@ impl VMMetaData {
170169
ret
171170
};
172171

173-
let vm_version_string: String = if let NestedMeta::Literal(lit) = vm_version_meta {
172+
let vm_version_string: String = if let NestedMeta::Lit(lit) = vm_version_meta {
174173
match lit {
175174
// Add a null terminator here to ensure that it is handled correctly when
176175
// converted to a C String.
@@ -268,8 +267,8 @@ fn build_static_data(names: &VMNameSet, metadata: &VMMetaData) -> proc_macro2::T
268267

269268
/// Takes a capabilities flag and builds the evmc_get_capabilities callback.
270269
fn build_capabilities_fn(capabilities: u32) -> proc_macro2::TokenStream {
271-
let capabilities_literal =
272-
LitInt::new(capabilities as u64, IntSuffix::U32, capabilities.span());
270+
let capabilities_string = capabilities.to_string();
271+
let capabilities_literal = LitInt::new(&capabilities_string, capabilities.span());
273272

274273
quote! {
275274
extern "C" fn __evmc_get_capabilities(instance: *mut ::evmc_vm::ffi::evmc_vm) -> ::evmc_vm::ffi::evmc_capabilities_flagset {

bindings/rust/evmc-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ categories = ["external-ffi-bindings"]
1313
edition = "2018"
1414

1515
[build-dependencies]
16-
bindgen = "0.51.0"
16+
bindgen = "0.52.0"

0 commit comments

Comments
 (0)