Skip to content

Commit

Permalink
fix wave breakage due to new stream/future/error-context types
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
  • Loading branch information
dicej committed Nov 21, 2024
1 parent 83eb855 commit 191b9f4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions crates/wasmtime/src/runtime/vm/component/states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ enum Slot<T> {
pub struct StateTable<T> {
next: u32,
slots: Vec<Slot<T>>,
// TODO: This is a sparse table (where zero means "no entry"); it might make
// more sense to use a `HashMap` here, but we'd need one that's
// no_std-compatible. A `BTreeMap` might also be appropriate if we restrict
// ourselves to `alloc::collections`.
reps_to_indexes: Vec<u32>,
}

Expand Down
10 changes: 8 additions & 2 deletions crates/wasmtime/src/runtime/wave/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ impl WasmType for component::Type {
Self::Result(_) => WasmTypeKind::Result,
Self::Flags(_) => WasmTypeKind::Flags,

Self::Own(_) | Self::Borrow(_) => WasmTypeKind::Unsupported,
Self::Own(_)
| Self::Borrow(_)
| Self::Stream(_)
| Self::Future(_)
| Self::ErrorContext => WasmTypeKind::Unsupported,
}
}

Expand Down Expand Up @@ -134,7 +138,9 @@ impl WasmValue for component::Val {
Self::Option(_) => WasmTypeKind::Option,
Self::Result(_) => WasmTypeKind::Result,
Self::Flags(_) => WasmTypeKind::Flags,
Self::Resource(_) => WasmTypeKind::Unsupported,
Self::Resource(_) | Self::Stream(_) | Self::Future(_) | Self::ErrorContext(_) => {
WasmTypeKind::Unsupported
}
}
}

Expand Down

0 comments on commit 191b9f4

Please sign in to comment.