From 68ef5d93613dcf734efa908a1f1ea04e5da2d0a2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 18:06:31 +0300 Subject: [PATCH] chore(deps): update Rust crate nom to v7 (#24) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Valery Antopol --- Cargo.lock | 60 ++++++++------------------------ crates/it-types/Cargo.toml | 2 +- wasmer-it/Cargo.toml | 4 +-- wasmer-it/src/decoders/binary.rs | 12 +++---- 4 files changed, 23 insertions(+), 55 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09d6ad4..b2683bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,18 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - [[package]] name = "cfg-if" version = "1.0.0" @@ -28,7 +16,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "fluence-it-types" -version = "0.3.1" +version = "0.3.2" dependencies = [ "it-to-bytes", "nom", @@ -39,7 +27,7 @@ dependencies = [ [[package]] name = "it-lilo" -version = "0.4.0" +version = "0.4.1" dependencies = [ "fluence-it-types", "it-memory-traits", @@ -50,7 +38,7 @@ dependencies = [ [[package]] name = "it-memory-traits" -version = "0.3.0" +version = "0.3.1" dependencies = [ "thiserror", ] @@ -80,19 +68,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "log" version = "0.4.17" @@ -109,14 +84,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] -name = "nom" -version = "5.1.2" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ - "lexical-core", "memchr", - "version_check", + "minimal-lexical", ] [[package]] @@ -192,12 +172,6 @@ dependencies = [ "serde", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - [[package]] name = "syn" version = "1.0.99" @@ -245,15 +219,9 @@ dependencies = [ "syn", ] -[[package]] -name = "version_check" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - [[package]] name = "wasmer-interface-types-fl" -version = "0.24.0" +version = "0.25.0" dependencies = [ "fluence-it-types", "it-lilo", diff --git a/crates/it-types/Cargo.toml b/crates/it-types/Cargo.toml index 1421a80..0cf8a6b 100644 --- a/crates/it-types/Cargo.toml +++ b/crates/it-types/Cargo.toml @@ -15,7 +15,7 @@ it-to-bytes = { path = "../to-bytes/", version = "0.1.0" } serde = { version = "1.0.144", features = ["derive", "rc"]} -nom = { version = "5.1", optional = true } +nom = { version = "7.1", optional = true } wast = { version = "8.0", optional = true } variant_count = "1.1" diff --git a/wasmer-it/Cargo.toml b/wasmer-it/Cargo.toml index 39eafe5..893bc89 100644 --- a/wasmer-it/Cargo.toml +++ b/wasmer-it/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-interface-types-fl" -version = "0.24.1" +version = "0.25.0" description = "WebAssembly Interface Types library for Wasmer" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -13,7 +13,7 @@ it-to-bytes = { path = "../crates/to-bytes", version = "0.1.0" } it-lilo = { path = "../crates/it-lilo", version = "0.4.1" } it-memory-traits = { path = "../crates/it-memory-traits", version = "0.3.1" } -nom = "5.1" +nom = "7.1" wast = "8.0" # `serde` is useful only to simplify the users' life. It is not diff --git a/wasmer-it/src/decoders/binary.rs b/wasmer-it/src/decoders/binary.rs index fd42b4d..309d518 100644 --- a/wasmer-it/src/decoders/binary.rs +++ b/wasmer-it/src/decoders/binary.rs @@ -137,7 +137,7 @@ fn ty<'input, E: ParseError<&'input [u8]>>( IType::Record(record_id) } - _ => return Err(Err::Error(make_error(input, ErrorKind::ParseTo))), + _ => return Err(Err::Error(make_error(input, ErrorKind::Alt))), }; Ok((input, ty)) @@ -179,7 +179,7 @@ fn string<'input, E: ParseError<&'input [u8]>>( Ok(( &input[length..], str::from_utf8(&input[..length]) - .map_err(|_| Err::Error(make_error(input, ErrorKind::ParseTo)))?, + .map_err(|_| Err::Error(make_error(input, ErrorKind::Char)))?, )) } @@ -201,7 +201,7 @@ fn owned_string<'input, E: ParseError<&'input [u8]>>( Ok(( &input[length..], String::from_utf8(input[..length].to_vec()) - .map_err(|_| Err::Error(make_error(input, ErrorKind::ParseTo)))?, + .map_err(|_| Err::Error(make_error(input, ErrorKind::Char)))?, )) } @@ -362,7 +362,7 @@ fn instruction<'input, E: ParseError<&'input [u8]>>( ) } - _ => return Err(Err::Error(make_error(input, ErrorKind::ParseTo))), + _ => return Err(Err::Error(make_error(input, ErrorKind::Alt))), }) } @@ -378,7 +378,7 @@ fn types<'input, E: ParseError<&'input [u8]>>( consume!((input, type_kind) = byte(input)?); let type_kind = TypeKind::try_from(type_kind) - .map_err(|_| Err::Error(make_error(input, ErrorKind::ParseTo)))?; + .map_err(|_| Err::Error(make_error(input, ErrorKind::Alt)))?; match type_kind { TypeKind::Function => { @@ -505,7 +505,7 @@ fn interfaces<'input, E: ParseError<&'input [u8]>>( consume!((input, interface_kind) = byte(input)?); let interface_kind = InterfaceKind::try_from(interface_kind) - .map_err(|_| Err::Error(make_error(input, ErrorKind::ParseTo)))?; + .map_err(|_| Err::Error(make_error(input, ErrorKind::Alt)))?; match interface_kind { InterfaceKind::Version => {