Skip to content

Commit

Permalink
Update wasmparser dependency to 0.208.1
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed May 26, 2024
1 parent 18d5d59 commit b271ade
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
with:
submodules: true
- uses: dtolnay/[email protected]
- uses: dtolnay/[email protected]
- run: cargo xtask msrv

rustfmt:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ features = ['doc']
crc32fast = { version = "1.2", default-features = false, optional = true }
flate2 = { version = "1", optional = true }
indexmap = { version = "2.0", default-features = false, optional = true }
wasmparser = { version = "0.202.0", optional = true }
wasmparser = { version = "0.208.1", default-features = false, optional = true }
memchr = { version = "2.4.1", default-features = false }
hashbrown = { version = "0.14.0", features = ["ahash"], default-features = false, optional = true }
ruzstd = { version = "0.6.0", optional = true }
Expand Down
3 changes: 3 additions & 0 deletions src/build/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ use alloc::vec::Vec;
use core::convert::TryInto;
use core::fmt;
use core::marker::PhantomData;
#[cfg(not(feature = "std"))]
use hashbrown::HashMap;
#[cfg(feature = "std")]
use std::collections::HashMap;

use crate::build::{ByteString, Bytes, Error, Id, IdPrivate, Item, Result, Table};
use crate::elf;
Expand Down
9 changes: 6 additions & 3 deletions src/read/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,12 @@ impl<'data, R: ReadRef<'data>> WasmFile<'data, R> {
range.start = range.end - size;
file.add_section(SectionId::Custom, range, name);
if name == "name" {
for name in
wp::NameSectionReader::new(section.data(), section.data_offset())
{
let reader = wp::BinaryReader::new(
section.data(),
section.data_offset(),
wp::WasmFeatures::all(),
);
for name in wp::NameSectionReader::new(reader) {
// TODO: Right now, ill-formed name subsections
// are silently ignored in order to maintain
// compatibility with extended name sections, which
Expand Down
14 changes: 10 additions & 4 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,23 @@ fn cmd_cross() -> Result<(), DynError> {
}

fn cmd_msrv() -> Result<(), DynError> {
// Test MSRV for object all features.
cargo(&["update", "-p", "ahash", "--precise", "0.8.6"])?;
cargo(&["update", "-p", "ahash", "--precise", "0.8.7"])?;
cmd_with(
"cargo",
&["+1.65.0", "test", "-p", "object", "--features", "all"],
&["+1.65.0", "test", "-p", "object", "--features", "read,write,build,std,compression"],
|cmd| {
cmd.env("CARGO_NET_GIT_FETCH_WITH_CLI", "true");
},
)?;

cargo(&["update", "-p", "ahash"])?;
// wasmparser needs 1.76.0
cmd_with(
"cargo",
&["+1.76.0", "test", "-p", "object", "--features", "all"],
|cmd| {
cmd.env("CARGO_NET_GIT_FETCH_WITH_CLI", "true");
},
)?;
Ok(())
}

Expand Down

0 comments on commit b271ade

Please sign in to comment.