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> {
17
17
pub struct StateTable < T > {
18
18
next : u32 ,
19
19
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`.
20
24
reps_to_indexes : Vec < u32 > ,
21
25
}
22
26
Original file line number Diff line number Diff line change @@ -41,7 +41,11 @@ impl WasmType for component::Type {
41
41
Self :: Result ( _) => WasmTypeKind :: Result ,
42
42
Self :: Flags ( _) => WasmTypeKind :: Flags ,
43
43
44
- Self :: Own ( _) | Self :: Borrow ( _) => WasmTypeKind :: Unsupported ,
44
+ Self :: Own ( _)
45
+ | Self :: Borrow ( _)
46
+ | Self :: Stream ( _)
47
+ | Self :: Future ( _)
48
+ | Self :: ErrorContext => WasmTypeKind :: Unsupported ,
45
49
}
46
50
}
47
51
@@ -134,7 +138,9 @@ impl WasmValue for component::Val {
134
138
Self :: Option ( _) => WasmTypeKind :: Option ,
135
139
Self :: Result ( _) => WasmTypeKind :: Result ,
136
140
Self :: Flags ( _) => WasmTypeKind :: Flags ,
137
- Self :: Resource ( _) => WasmTypeKind :: Unsupported ,
141
+ Self :: Resource ( _) | Self :: Stream ( _) | Self :: Future ( _) | Self :: ErrorContext ( _) => {
142
+ WasmTypeKind :: Unsupported
143
+ }
138
144
}
139
145
}
140
146
You can’t perform that action at this time.
0 commit comments