@@ -36,9 +36,8 @@ use wasmtime::{
3636 component:: { Component , InstancePre , Linker } ,
3737 Engine , Store ,
3838} ;
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 ;
4241
4342pub use test_key_value:: KeyValueReport ;
4443pub use test_llm:: LlmReport ;
@@ -164,7 +163,7 @@ pub async fn test(
164163 test_config : TestConfig ,
165164) -> Result < Report > {
166165 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) ?;
168167 http:: add_to_linker ( & mut linker, |context| & mut context. http ) ?;
169168 redis:: add_to_linker ( & mut linker, |context| & mut context. redis ) ?;
170169 postgres:: add_to_linker ( & mut linker, |context| & mut context. postgres ) ?;
@@ -291,8 +290,10 @@ async fn run_command(
291290 match store. data ( ) . test_config . invocation_style {
292291 InvocationStyle :: InboundHttp => {
293292 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+ } )
296297 . ok_or_else ( || {
297298 anyhow ! ( "no fermyon:spin/inbound-http/handle-request function was found" )
298299 } ) ?;
0 commit comments