@@ -46,6 +46,7 @@ impl HostFunc {
46
46
memory : * mut VMMemoryDefinition ,
47
47
realloc : * mut VMFuncRef ,
48
48
string_encoding : u8 ,
49
+ async_ : u8 ,
49
50
storage : NonNull < MaybeUninit < ValRaw > > ,
50
51
storage_len : usize ,
51
52
) -> bool
@@ -66,6 +67,7 @@ impl HostFunc {
66
67
memory,
67
68
realloc,
68
69
StringEncoding :: from_u8 ( string_encoding) . unwrap ( ) ,
70
+ async_ != 0 ,
69
71
NonNull :: slice_from_raw_parts ( storage, storage_len) . as_mut ( ) ,
70
72
|store, args| ( * data) ( store, args) ,
71
73
)
@@ -142,6 +144,7 @@ unsafe fn call_host<T, Params, Return, F>(
142
144
memory : * mut VMMemoryDefinition ,
143
145
realloc : * mut VMFuncRef ,
144
146
string_encoding : StringEncoding ,
147
+ async_ : bool ,
145
148
storage : & mut [ MaybeUninit < ValRaw > ] ,
146
149
closure : F ,
147
150
) -> Result < ( ) >
@@ -150,6 +153,10 @@ where
150
153
Return : Lower ,
151
154
F : FnOnce ( StoreContextMut < ' _ , T > , Params ) -> Result < Return > ,
152
155
{
156
+ if async_ {
157
+ todo ! ( )
158
+ }
159
+
153
160
/// Representation of arguments to this function when a return pointer is in
154
161
/// use, namely the argument list is followed by a single value which is the
155
162
/// return pointer.
@@ -320,12 +327,17 @@ unsafe fn call_host_dynamic<T, F>(
320
327
memory : * mut VMMemoryDefinition ,
321
328
realloc : * mut VMFuncRef ,
322
329
string_encoding : StringEncoding ,
330
+ async_ : bool ,
323
331
storage : & mut [ MaybeUninit < ValRaw > ] ,
324
332
closure : F ,
325
333
) -> Result < ( ) >
326
334
where
327
335
F : FnOnce ( StoreContextMut < ' _ , T > , & [ Val ] , & mut [ Val ] ) -> Result < ( ) > ,
328
336
{
337
+ if async_ {
338
+ todo ! ( )
339
+ }
340
+
329
341
let options = Options :: new (
330
342
store. 0 . id ( ) ,
331
343
NonNull :: new ( memory) ,
@@ -429,6 +441,7 @@ extern "C" fn dynamic_entrypoint<T, F>(
429
441
memory : * mut VMMemoryDefinition ,
430
442
realloc : * mut VMFuncRef ,
431
443
string_encoding : u8 ,
444
+ async_ : u8 ,
432
445
storage : NonNull < MaybeUninit < ValRaw > > ,
433
446
storage_len : usize ,
434
447
) -> bool
@@ -447,6 +460,7 @@ where
447
460
memory,
448
461
realloc,
449
462
StringEncoding :: from_u8 ( string_encoding) . unwrap ( ) ,
463
+ async_ != 0 ,
450
464
NonNull :: slice_from_raw_parts ( storage, storage_len) . as_mut ( ) ,
451
465
|store, params, results| ( * data) ( store, params, results) ,
452
466
)
0 commit comments