Skip to content

Commit 3d6c1a0

Browse files
committed
support composing with fixed size lists
1 parent c921e0d commit 3d6c1a0

File tree

3 files changed

+81
-41
lines changed

3 files changed

+81
-41
lines changed

Cargo.lock

+69-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+8-7
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ wac-parser = { path = "crates/wac-parser", version = "0.7.0-dev", default-featur
6363
wac-resolver = { path = "crates/wac-resolver", version = "0.7.0-dev", default-features = false }
6464
wac-graph = { path = "crates/wac-graph", version = "0.7.0-dev" }
6565
wac-types = { path = "crates/wac-types", version = "0.7.0-dev" }
66-
wit-parser = "0.227.0"
67-
wasmparser = "0.227.0"
68-
wit-component = "0.227.0"
69-
wasm-encoder = "0.227.0"
70-
wasmprinter = "0.227.0"
71-
wasm-metadata = "0.227.0"
72-
wat = "1.227.0"
66+
wit-parser = { git = "https://github.com/cpetig/wasm-tools", branch = "fixed-length-list" }
67+
wasmparser = { git = "https://github.com/cpetig/wasm-tools", branch = "fixed-length-list" }
68+
wit-component = { git = "https://github.com/cpetig/wasm-tools", branch = "fixed-length-list" }
69+
wasm-encoder = { git = "https://github.com/cpetig/wasm-tools", branch = "fixed-length-list" }
70+
wasmprinter = { git = "https://github.com/cpetig/wasm-tools", branch = "fixed-length-list" }
71+
wasm-metadata = { git = "https://github.com/cpetig/wasm-tools", branch = "fixed-length-list" }
72+
wat = { git = "https://github.com/cpetig/wasm-tools", branch = "fixed-length-list" }
7373
anyhow = "1.0.81"
74+
7475
clap = { version = "4.5.4", features = ["derive"] }
7576
semver = { version = "1.0.22", features = ["serde"] }
7677
pretty_env_logger = "0.5.0"

crates/wac-types/src/package.rs

+4
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,10 @@ impl<'a> TypeConverter<'a> {
754754
let option = ty.map(|ty| self.component_val_type(ty)).transpose()?;
755755
ValueType::Defined(self.types.add_defined_type(DefinedType::Future(option)))
756756
}
757+
wasm::ComponentDefinedType::FixedSizeList(ty, _) => {
758+
let ty = self.component_val_type(*ty)?;
759+
ValueType::Defined(self.types.add_defined_type(DefinedType::List(ty)))
760+
}
757761
};
758762

759763
self.cache.insert(key, Entity::Type(Type::Value(ty)));

0 commit comments

Comments
 (0)