Skip to content

Commit 2b51f7c

Browse files
pchickeylann
andauthored
Add lann/wasm-wave to crates (#1606)
* import wasm-wave 0.6.0 with minor fixes to fit in workspace, delete dependency on wasmtime, and fix some benign warnings Co-authored-by: Lann Martin <lann.martin@fermyon.com> * import tests from wasm-wave 0.6.0 wasmtime test removed from these sources, since that depends on wasm_wave::wasmtime which was not imported here. Co-authored-by: Lann Martin <lann.martin@fermyon.com> * wave ui tests: upgrade snapbox, depend on tryfn, use new syntax * wasm-wave: remove wasmtime test dep, and dead test code * wasm-wave: latest wit-parser api changes * wasm-wave: remove use of wasmtime from rustdocs * fixes for rebase * values and types: derive Eq in addition to PartialEq This is due to a bug that only occurs in MSRV (1.76.0) where, for consts such as Ty::BOOL be used in patterns, the type must derive not just PartialEq but also Eq. This restriction is relaxed in later rust releases for consts constructed directly rather than with const fns. * replace snapbox with by-hand implementation snapbox had a pretty trivial incompatibility with wasm32-wasi, and once i fixed that I found one of its deps did as well, so rather than shave all those yaks just replace the bit we need with this trivial code * readme: fix url to wit * url fixes * delete duplicate license * add wasm-wave to crates to publish * add comment of todo * add todo in comment * gitattributes: wave test input and output are text but newlines should not be messed with --------- Co-authored-by: Lann Martin <lann.martin@fermyon.com>
1 parent 999fc16 commit 2b51f7c

71 files changed

Lines changed: 5719 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.waves text eol=lf
2+
*.out text eol=lf

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ members = [
3636
'crates/c-api',
3737
'crates/fuzz-stats',
3838
'crates/wasm-mutate-stats',
39+
'crates/wasm-wave',
3940
'fuzz',
4041
'crates/wit-encoder',
4142
'crates/wit-parser/fuzz',

ci/publish.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const CRATES_TO_PUBLISH: &[&str] = &[
3131
"wit-encoder",
3232
"wasm-compose",
3333
"wit-smith",
34+
"wasm-wave",
3435
"wasm-tools",
3536
];
3637

crates/wasm-wave/Cargo.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[package]
2+
name = "wasm-wave"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors = ["lann.martin@fermyon.com"]
7+
description = "WebAssembly Value Encoding"
8+
documentation = "https://docs.rs/wasm-wave"
9+
categories = ["wasm", "encoding", "parser-implementations"]
10+
repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-wave"
11+
readme = "README.md"
12+
13+
[features]
14+
default = ["wit"]
15+
wit = ["dep:wit-parser"]
16+
17+
[dependencies]
18+
indexmap.workspace = true
19+
logos = "0.14.0"
20+
thiserror = "1.0.48"
21+
wit-parser = { workspace = true, optional = true }
22+
23+
[dev-dependencies]
24+
anyhow.workspace = true

0 commit comments

Comments
 (0)