@@ -699,7 +699,7 @@ pub fn generate() -> Result<()> {
699699
700700 writeln ! (
701701 & mut typed_function_inits,
702- r#"echo{test_index}: instance.get_typed_func::<({params}), ({result_type},)>(&mut *store, component.export_index (Some(&index), "echo{test_index}").unwrap().1 )?,"#
702+ r#"echo{test_index}: instance.get_typed_func::<({params}), ({result_type},)>(&mut *store, component.get_export_index (Some(&index), "echo{test_index}").unwrap())?,"#
703703 )
704704 . unwrap ( ) ;
705705 }
@@ -802,7 +802,7 @@ use {{
802802 once_cell::sync::Lazy,
803803 proptest::strategy::{{Just, Strategy}},
804804 wasmtime::{{
805- component::{{Instance, InstancePre, Linker, TypedFunc}},
805+ component::{{Instance, InstancePre, Linker, TypedFunc, HasSelf }},
806806 Store,
807807 }},
808808}};
@@ -828,8 +828,8 @@ impl super::Host for Host {{
828828 type World = Exports;
829829
830830 fn add_to_linker(linker: &mut Linker<Ctx>) -> Result<()> {{
831- wasmtime_wasi::add_to_linker_async(&mut *linker)?;
832- {PREFIX}::add_to_linker(linker, |ctx| ctx)?;
831+ wasmtime_wasi::p2:: add_to_linker_async(&mut *linker)?;
832+ {PREFIX}::add_to_linker::<_, HasSelf<_>> (linker, |ctx| ctx)?;
833833 Ok(())
834834 }}
835835
@@ -838,7 +838,7 @@ impl super::Host for Host {{
838838 pre: InstancePre<Ctx>,
839839 ) -> Result<Self::World> {{
840840 let component = pre.component();
841- let (_, index) = component.export_index (None, "componentize-py:test/echoes-generated").unwrap();
841+ let index = component.get_export_index (None, "componentize-py:test/echoes-generated").unwrap();
842842 let instance = pre.instantiate_async(&mut *store).await?;
843843 Ok((Self::World {{
844844 {typed_function_inits}
0 commit comments