Skip to content

Commit b484f2b

Browse files
chore: update deps, fix clippy warnings, add wast ModuleDefinition
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent 1d75481 commit b484f2b

8 files changed

Lines changed: 111 additions & 75 deletions

File tree

Cargo.lock

Lines changed: 67 additions & 56 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
@@ -18,9 +18,9 @@ pretty_env_logger="0.5"
1818
serde_json={version="1.0"}
1919
serde={version="1.0", features=["derive"]}
2020
wasm-testsuite={version="0.7"}
21-
wasmparser={version="0.253", default-features=false}
22-
wast="253"
23-
wat="1.253"
21+
wasmparser={version="0.254", default-features=false}
22+
wast="254"
23+
wat="1.254"
2424

2525
[workspace.package]
2626
version="0.9.1"

crates/cli/src/engine_flags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl EngineFlags {
9191
MemoryBackendArg::Vec => tinywasm::MemoryBackend::vec(),
9292
MemoryBackendArg::Paged => {
9393
if self.memory_page_chunk_size == 0 {
94-
bail!("--memory-page-chunk-size must be greater than zero")
94+
bail!("--memory-page-chunk-size must be greater than zero");
9595
}
9696
tinywasm::MemoryBackend::paged(self.memory_page_chunk_size)
9797
}

crates/cli/src/load.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ pub fn load_module(input: &str) -> Result<LoadedModule> {
2525
pub fn load_compilable_module(input: &str) -> Result<Module> {
2626
let loaded = load_module(input)?;
2727
if loaded.format == InputFormat::Twasm {
28-
bail!("input is already a twasm archive; use `run`, `dump`, or `inspect` instead")
28+
bail!("input is already a twasm archive; use `run`, `dump`, or `inspect` instead");
2929
}
3030
Ok(loaded.module)
3131
}
3232

3333
pub fn default_twasm_output_path(input: &str) -> Result<String> {
3434
if input == "-" {
35-
bail!("--output is required when compiling from stdin")
35+
bail!("--output is required when compiling from stdin");
3636
}
3737

3838
let path = Path::new(input);
@@ -50,7 +50,7 @@ pub fn write_output_bytes(output: &str, bytes: &[u8], force: bool) -> Result<()>
5050

5151
let path = Path::new(output);
5252
if path.exists() && !force {
53-
bail!("output file already exists: {output}; pass --force to overwrite")
53+
bail!("output file already exists: {output}; pass --force to overwrite");
5454
}
5555

5656
std::fs::write(path, bytes).with_context(|| format!("failed to write output file `{output}`"))?;

crates/cli/src/value_parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::output::format_wasm_type;
55

66
pub fn parse_invocation_args(ty: &FuncType, args: &[String]) -> Result<Vec<WasmValue>> {
77
if args.len() != ty.params().len() {
8-
bail!("wrong number of arguments: expected {}, got {}", ty.params().len(), args.len())
8+
bail!("wrong number of arguments: expected {}, got {}", ty.params().len(), args.len());
99
}
1010

1111
ty.params().iter().enumerate().map(|(idx, param_ty)| parse_arg(idx, *param_ty, &args[idx])).collect()
@@ -26,7 +26,7 @@ fn parse_arg(index: usize, ty: WasmType, value: &str) -> Result<WasmValue> {
2626
"unsupported CLI argument type at position {}: {}; use the embedding API for reference values",
2727
index + 1,
2828
format_wasm_type(ty)
29-
)
29+
);
3030
}
3131
};
3232

0 commit comments

Comments
 (0)