@@ -36,9 +36,8 @@ use wasmtime::{
36
36
component:: { Component , InstancePre , Linker } ,
37
37
Engine , Store ,
38
38
} ;
39
- use wasmtime_wasi:: {
40
- pipe:: MemoryOutputPipe , IoView , ResourceTable , WasiCtx , WasiCtxBuilder , WasiView ,
41
- } ;
39
+ use wasmtime_wasi:: p2:: { pipe:: MemoryOutputPipe , IoView , WasiCtx , WasiCtxBuilder , WasiView } ;
40
+ use wasmtime_wasi:: ResourceTable ;
42
41
43
42
pub use test_key_value:: KeyValueReport ;
44
43
pub use test_llm:: LlmReport ;
@@ -164,7 +163,7 @@ pub async fn test(
164
163
test_config : TestConfig ,
165
164
) -> Result < Report > {
166
165
let mut linker = Linker :: < Context > :: new ( engine) ;
167
- wasmtime_wasi:: add_to_linker_async ( & mut linker) ?;
166
+ wasmtime_wasi:: p2 :: add_to_linker_async ( & mut linker) ?;
168
167
http:: add_to_linker ( & mut linker, |context| & mut context. http ) ?;
169
168
redis:: add_to_linker ( & mut linker, |context| & mut context. redis ) ?;
170
169
postgres:: add_to_linker ( & mut linker, |context| & mut context. postgres ) ?;
@@ -291,8 +290,10 @@ async fn run_command(
291
290
match store. data ( ) . test_config . invocation_style {
292
291
InvocationStyle :: InboundHttp => {
293
292
let func = instance
294
- . get_export ( & mut * store, None , "fermyon:spin/inbound-http" )
295
- . and_then ( |i| instance. get_export ( & mut * store, Some ( & i) , "handle-request" ) )
293
+ . get_export_index ( & mut * store, None , "fermyon:spin/inbound-http" )
294
+ . and_then ( |i| {
295
+ instance. get_export_index ( & mut * store, Some ( & i) , "handle-request" )
296
+ } )
296
297
. ok_or_else ( || {
297
298
anyhow ! ( "no fermyon:spin/inbound-http/handle-request function was found" )
298
299
} ) ?;
0 commit comments