Skip to content

Commit 0f3581e

Browse files
chore: update deps, update nightly
Signed-off-by: Henry Gressmann <[email protected]>
1 parent e1b7638 commit 0f3581e

File tree

15 files changed

+63
-47
lines changed

15 files changed

+63
-47
lines changed

Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ default-members=[".", "crates/tinywasm", "crates/types", "crates/parser"]
44
resolver="2"
55

66
[workspace.dependencies]
7-
wast="229"
8-
wat="1.229"
9-
wasmparser={version="0.229", default-features=false}
7+
wast="230"
8+
wat="1.230"
9+
wasmparser={version="0.230", default-features=false}
1010
eyre="0.6"
1111
log="0.4"
1212
pretty_env_logger="0.5"

crates/cli/src/bin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn main() -> Result<()> {
8282

8383
match args.nested {
8484
TinyWasmSubcommand::Run(Run { wasm_file, engine, args, func }) => {
85-
debug!("args: {:?}", args);
85+
debug!("args: {args:?}");
8686

8787
let path = cwd.join(wasm_file.clone());
8888
let module = match wasm_file.ends_with(".wat") {

crates/parser/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ impl Parser {
8383
cm_nested_names: false,
8484
cm_values: false,
8585
cm_error_context: false,
86+
cm_fixed_size_list: false,
87+
cm_gc: false,
8688
};
8789
Validator::new_with_features(features.into())
8890
}

crates/parser/src/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl ModuleReader {
125125
self.code_type_addrs = reader.into_iter().map(|f| Ok(f?)).collect::<Result<Vec<_>>>()?;
126126
}
127127
CodeSectionStart { count, range, .. } => {
128-
debug!("Found code section ({} functions)", count);
128+
debug!("Found code section ({count} functions)");
129129
if !self.code.is_empty() {
130130
return Err(ParseError::DuplicateSection("Code section".into()));
131131
}

crates/parser/src/visit.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,21 @@ impl<'a, R: WasmModuleResources> wasmparser::VisitOperator<'a> for FunctionBuild
453453
self.instructions.push(Instruction::RefIsNull);
454454
}
455455

456+
fn visit_typed_select_multi(&mut self, _tys: Vec<wasmparser::ValType>) -> Self::Output {
457+
self.errors.push(crate::ParseError::UnsupportedOperator(
458+
"Typed select with multiple types is not supported".to_string(),
459+
));
460+
461+
// self.instructions.extend(tys.into_iter().map(|ty| match ty {
462+
// wasmparser::ValType::I32 => Instruction::Select32,
463+
// wasmparser::ValType::F32 => Instruction::Select32,
464+
// wasmparser::ValType::I64 => Instruction::Select64,
465+
// wasmparser::ValType::F64 => Instruction::Select64,
466+
// wasmparser::ValType::V128 => Instruction::Select128,
467+
// wasmparser::ValType::Ref(_) => Instruction::SelectRef,
468+
// }));
469+
}
470+
456471
fn visit_typed_select(&mut self, ty: wasmparser::ValType) -> Self::Output {
457472
self.instructions.push(match ty {
458473
wasmparser::ValType::I32 => Instruction::Select32,

crates/tinywasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tinywasm-types={version="0.9.0-alpha.0", path="../types", default-features=false
2020
libm={version="0.2", default-features=false}
2121

2222
[dev-dependencies]
23-
wasm-testsuite={version="0.5.3"}
23+
wasm-testsuite={version="0.5.4"}
2424
indexmap="2.7"
2525
wast={workspace=true}
2626
wat={workspace=true}

crates/tinywasm/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ impl Display for Error {
211211
impl Display for LinkingError {
212212
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
213213
match self {
214-
Self::UnknownImport { module, name } => write!(f, "unknown import: {}.{}", module, name),
214+
Self::UnknownImport { module, name } => write!(f, "unknown import: {module}.{name}"),
215215
Self::IncompatibleImportType { module, name } => {
216-
write!(f, "incompatible import type: {}.{}", module, name)
216+
write!(f, "incompatible import type: {module}.{name}")
217217
}
218218
}
219219
}

crates/tinywasm/src/func.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl FuncHandle {
3939
// 5. For each value type and the corresponding value, check if types match
4040
if !(func_ty.params.iter().zip(params).enumerate().all(|(_i, (ty, param))| {
4141
if ty != &param.val_type() {
42-
log::error!("param type mismatch at index {}: expected {:?}, got {:?}", _i, ty, param);
42+
log::error!("param type mismatch at index {_i}: expected {ty:?}, got {param:?}");
4343
false
4444
} else {
4545
true

crates/tinywasm/src/instance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl ModuleInstance {
192192
pub fn exported_memory<'a>(&self, store: &'a mut Store, name: &str) -> Result<MemoryRef<'a>> {
193193
let export = self.export_addr(name).ok_or_else(|| Error::Other(format!("Export not found: {name}")))?;
194194
let ExternVal::Memory(mem_addr) = export else {
195-
return Err(Error::Other(format!("Export is not a memory: {}", name)));
195+
return Err(Error::Other(format!("Export is not a memory: {name}")));
196196
};
197197

198198
self.memory(store, mem_addr)
@@ -202,7 +202,7 @@ impl ModuleInstance {
202202
pub fn exported_memory_mut<'a>(&self, store: &'a mut Store, name: &str) -> Result<MemoryRefMut<'a>> {
203203
let export = self.export_addr(name).ok_or_else(|| Error::Other(format!("Export not found: {name}")))?;
204204
let ExternVal::Memory(mem_addr) = export else {
205-
return Err(Error::Other(format!("Export is not a memory: {}", name)));
205+
return Err(Error::Other(format!("Export is not a memory: {name}")));
206206
};
207207

208208
self.memory_mut(store, mem_addr)

0 commit comments

Comments
 (0)