Skip to content

Commit 191b9f4

Browse files
committed
fix wave breakage due to new stream/future/error-context types
Signed-off-by: Joel Dice <[email protected]>
1 parent 83eb855 commit 191b9f4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

crates/wasmtime/src/runtime/vm/component/states.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ enum Slot<T> {
1717
pub struct StateTable<T> {
1818
next: u32,
1919
slots: Vec<Slot<T>>,
20+
// TODO: This is a sparse table (where zero means "no entry"); it might make
21+
// more sense to use a `HashMap` here, but we'd need one that's
22+
// no_std-compatible. A `BTreeMap` might also be appropriate if we restrict
23+
// ourselves to `alloc::collections`.
2024
reps_to_indexes: Vec<u32>,
2125
}
2226

crates/wasmtime/src/runtime/wave/component.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ impl WasmType for component::Type {
4141
Self::Result(_) => WasmTypeKind::Result,
4242
Self::Flags(_) => WasmTypeKind::Flags,
4343

44-
Self::Own(_) | Self::Borrow(_) => WasmTypeKind::Unsupported,
44+
Self::Own(_)
45+
| Self::Borrow(_)
46+
| Self::Stream(_)
47+
| Self::Future(_)
48+
| Self::ErrorContext => WasmTypeKind::Unsupported,
4549
}
4650
}
4751

@@ -134,7 +138,9 @@ impl WasmValue for component::Val {
134138
Self::Option(_) => WasmTypeKind::Option,
135139
Self::Result(_) => WasmTypeKind::Result,
136140
Self::Flags(_) => WasmTypeKind::Flags,
137-
Self::Resource(_) => WasmTypeKind::Unsupported,
141+
Self::Resource(_) | Self::Stream(_) | Self::Future(_) | Self::ErrorContext(_) => {
142+
WasmTypeKind::Unsupported
143+
}
138144
}
139145
}
140146

0 commit comments

Comments
 (0)