File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
crates/wasmtime/src/runtime Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ enum Slot<T> {
1717pub 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments