/// Auto-generated bindings for a pre-instantiated version of a /// component which implements the world `the-world`. /// /// This structure is created through [`TheWorldPre::new`] which /// takes a [`InstancePre`](wasmtime::component::InstancePre) that /// has been created through a [`Linker`](wasmtime::component::Linker). /// /// For more information see [`TheWorld`] as well. pub struct TheWorldPre { instance_pre: wasmtime::component::InstancePre, indices: TheWorldIndices, } impl Clone for TheWorldPre { fn clone(&self) -> Self { Self { instance_pre: self.instance_pre.clone(), indices: self.indices.clone(), } } } impl<_T> TheWorldPre<_T> { /// Creates a new copy of `TheWorldPre` bindings which can then /// be used to instantiate into a particular store. /// /// This method may fail if the component behind `instance_pre` /// does not have the required exports. pub fn new( instance_pre: wasmtime::component::InstancePre<_T>, ) -> wasmtime::Result { let indices = TheWorldIndices::new(instance_pre.component())?; Ok(Self { instance_pre, indices }) } pub fn engine(&self) -> &wasmtime::Engine { self.instance_pre.engine() } pub fn instance_pre(&self) -> &wasmtime::component::InstancePre<_T> { &self.instance_pre } /// Instantiates a new instance of [`TheWorld`] within the /// `store` provided. /// /// This function will use `self` as the pre-instantiated /// instance to perform instantiation. Afterwards the preloaded /// indices in `self` are used to lookup all exports on the /// resulting instance. pub fn instantiate( &self, mut store: impl wasmtime::AsContextMut, ) -> wasmtime::Result { let mut store = store.as_context_mut(); let instance = self.instance_pre.instantiate(&mut store)?; self.indices.load(&mut store, &instance) } } /// Auto-generated bindings for index of the exports of /// `the-world`. /// /// This is an implementation detail of [`TheWorldPre`] and can /// be constructed if needed as well. /// /// For more information see [`TheWorld`] as well. #[derive(Clone)] pub struct TheWorldIndices { interface0: exports::foo::foo::integers::GuestIndices, } /// Auto-generated bindings for an instance a component which /// implements the world `the-world`. /// /// This structure can be created through a number of means /// depending on your requirements and what you have on hand: /// /// * The most convenient way is to use /// [`TheWorld::instantiate`] which only needs a /// [`Store`], [`Component`], and [`Linker`]. /// /// * Alternatively you can create a [`TheWorldPre`] ahead of /// time with a [`Component`] to front-load string lookups /// of exports once instead of per-instantiation. This /// method then uses [`TheWorldPre::instantiate`] to /// create a [`TheWorld`]. /// /// * If you've instantiated the instance yourself already /// then you can use [`TheWorld::new`]. /// /// * You can also access the guts of instantiation through /// [`TheWorldIndices::new_instance`] followed /// by [`TheWorldIndices::load`] to crate an instance of this /// type. /// /// These methods are all equivalent to one another and move /// around the tradeoff of what work is performed when. /// /// [`Store`]: wasmtime::Store /// [`Component`]: wasmtime::component::Component /// [`Linker`]: wasmtime::component::Linker pub struct TheWorld { interface0: exports::foo::foo::integers::Guest, } const _: () = { #[allow(unused_imports)] use wasmtime::component::__internal::anyhow; impl TheWorldIndices { /// Creates a new copy of `TheWorldIndices` bindings which can then /// be used to instantiate into a particular store. /// /// This method may fail if the component does not have the /// required exports. pub fn new( component: &wasmtime::component::Component, ) -> wasmtime::Result { let _component = component; let interface0 = exports::foo::foo::integers::GuestIndices::new(_component)?; Ok(TheWorldIndices { interface0 }) } /// Creates a new instance of [`TheWorldIndices`] from an /// instantiated component. /// /// This method of creating a [`TheWorld`] will perform string /// lookups for all exports when this method is called. This /// will only succeed if the provided instance matches the /// requirements of [`TheWorld`]. pub fn new_instance( mut store: impl wasmtime::AsContextMut, instance: &wasmtime::component::Instance, ) -> wasmtime::Result { let _instance = instance; let interface0 = exports::foo::foo::integers::GuestIndices::new_instance( &mut store, _instance, )?; Ok(TheWorldIndices { interface0 }) } /// Uses the indices stored in `self` to load an instance /// of [`TheWorld`] from the instance provided. /// /// Note that at this time this method will additionally /// perform type-checks of all exports. pub fn load( &self, mut store: impl wasmtime::AsContextMut, instance: &wasmtime::component::Instance, ) -> wasmtime::Result { let _instance = instance; let interface0 = self.interface0.load(&mut store, &_instance)?; Ok(TheWorld { interface0 }) } } impl TheWorld { /// Convenience wrapper around [`TheWorldPre::new`] and /// [`TheWorldPre::instantiate`]. pub fn instantiate<_T>( mut store: impl wasmtime::AsContextMut, component: &wasmtime::component::Component, linker: &wasmtime::component::Linker<_T>, ) -> wasmtime::Result { let pre = linker.instantiate_pre(component)?; TheWorldPre::new(pre)?.instantiate(store) } /// Convenience wrapper around [`TheWorldIndices::new_instance`] and /// [`TheWorldIndices::load`]. pub fn new( mut store: impl wasmtime::AsContextMut, instance: &wasmtime::component::Instance, ) -> wasmtime::Result { let indices = TheWorldIndices::new_instance(&mut store, instance)?; indices.load(store, instance) } pub fn add_to_linker( linker: &mut wasmtime::component::Linker, get: impl Fn(&mut T) -> &mut U + Send + Sync + Copy + 'static, ) -> wasmtime::Result<()> where U: foo::foo::integers::Host, { foo::foo::integers::add_to_linker(linker, get)?; Ok(()) } pub fn foo_foo_integers(&self) -> &exports::foo::foo::integers::Guest { &self.interface0 } } }; pub mod foo { pub mod foo { #[allow(clippy::all)] pub mod integers { #[allow(unused_imports)] use wasmtime::component::__internal::{anyhow, Box}; pub trait Host { fn a1(&mut self, x: u8) -> (); fn a2(&mut self, x: i8) -> (); fn a3(&mut self, x: u16) -> (); fn a4(&mut self, x: i16) -> (); fn a5(&mut self, x: u32) -> (); fn a6(&mut self, x: i32) -> (); fn a7(&mut self, x: u64) -> (); fn a8(&mut self, x: i64) -> (); fn a9( &mut self, p1: u8, p2: i8, p3: u16, p4: i16, p5: u32, p6: i32, p7: u64, p8: i64, ) -> (); fn r1(&mut self) -> u8; fn r2(&mut self) -> i8; fn r3(&mut self) -> u16; fn r4(&mut self) -> i16; fn r5(&mut self) -> u32; fn r6(&mut self) -> i32; fn r7(&mut self) -> u64; fn r8(&mut self) -> i64; fn pair_ret(&mut self) -> (i64, u8); } pub trait GetHost< T, >: Fn(T) -> >::Host + Send + Sync + Copy + 'static { type Host: Host; } impl GetHost for F where F: Fn(T) -> O + Send + Sync + Copy + 'static, O: Host, { type Host = O; } pub fn add_to_linker_get_host( linker: &mut wasmtime::component::Linker, host_getter: impl for<'a> GetHost<&'a mut T>, ) -> wasmtime::Result<()> { let mut inst = linker.instance("foo:foo/integers")?; inst.func_wrap( "a1", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u8,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a1(host, arg0); Ok(r) }, )?; inst.func_wrap( "a2", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i8,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a2(host, arg0); Ok(r) }, )?; inst.func_wrap( "a3", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u16,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a3(host, arg0); Ok(r) }, )?; inst.func_wrap( "a4", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i16,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a4(host, arg0); Ok(r) }, )?; inst.func_wrap( "a5", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u32,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a5(host, arg0); Ok(r) }, )?; inst.func_wrap( "a6", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i32,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a6(host, arg0); Ok(r) }, )?; inst.func_wrap( "a7", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u64,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a7(host, arg0); Ok(r) }, )?; inst.func_wrap( "a8", move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i64,)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a8(host, arg0); Ok(r) }, )?; inst.func_wrap( "a9", move | mut caller: wasmtime::StoreContextMut<'_, T>, ( arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, ): (u8, i8, u16, i16, u32, i32, u64, i64)| { let host = &mut host_getter(caller.data_mut()); let r = Host::a9( host, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, ); Ok(r) }, )?; inst.func_wrap( "r1", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r1(host); Ok((r,)) }, )?; inst.func_wrap( "r2", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r2(host); Ok((r,)) }, )?; inst.func_wrap( "r3", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r3(host); Ok((r,)) }, )?; inst.func_wrap( "r4", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r4(host); Ok((r,)) }, )?; inst.func_wrap( "r5", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r5(host); Ok((r,)) }, )?; inst.func_wrap( "r6", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r6(host); Ok((r,)) }, )?; inst.func_wrap( "r7", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r7(host); Ok((r,)) }, )?; inst.func_wrap( "r8", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::r8(host); Ok((r,)) }, )?; inst.func_wrap( "pair-ret", move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| { let host = &mut host_getter(caller.data_mut()); let r = Host::pair_ret(host); Ok((r,)) }, )?; Ok(()) } pub fn add_to_linker( linker: &mut wasmtime::component::Linker, get: impl Fn(&mut T) -> &mut U + Send + Sync + Copy + 'static, ) -> wasmtime::Result<()> where U: Host, { add_to_linker_get_host(linker, get) } impl<_T: Host + ?Sized> Host for &mut _T { fn a1(&mut self, x: u8) -> () { Host::a1(*self, x) } fn a2(&mut self, x: i8) -> () { Host::a2(*self, x) } fn a3(&mut self, x: u16) -> () { Host::a3(*self, x) } fn a4(&mut self, x: i16) -> () { Host::a4(*self, x) } fn a5(&mut self, x: u32) -> () { Host::a5(*self, x) } fn a6(&mut self, x: i32) -> () { Host::a6(*self, x) } fn a7(&mut self, x: u64) -> () { Host::a7(*self, x) } fn a8(&mut self, x: i64) -> () { Host::a8(*self, x) } fn a9( &mut self, p1: u8, p2: i8, p3: u16, p4: i16, p5: u32, p6: i32, p7: u64, p8: i64, ) -> () { Host::a9(*self, p1, p2, p3, p4, p5, p6, p7, p8) } fn r1(&mut self) -> u8 { Host::r1(*self) } fn r2(&mut self) -> i8 { Host::r2(*self) } fn r3(&mut self) -> u16 { Host::r3(*self) } fn r4(&mut self) -> i16 { Host::r4(*self) } fn r5(&mut self) -> u32 { Host::r5(*self) } fn r6(&mut self) -> i32 { Host::r6(*self) } fn r7(&mut self) -> u64 { Host::r7(*self) } fn r8(&mut self) -> i64 { Host::r8(*self) } fn pair_ret(&mut self) -> (i64, u8) { Host::pair_ret(*self) } } } } } pub mod exports { pub mod foo { pub mod foo { #[allow(clippy::all)] pub mod integers { #[allow(unused_imports)] use wasmtime::component::__internal::{anyhow, Box}; pub struct Guest { a1: wasmtime::component::Func, a2: wasmtime::component::Func, a3: wasmtime::component::Func, a4: wasmtime::component::Func, a5: wasmtime::component::Func, a6: wasmtime::component::Func, a7: wasmtime::component::Func, a8: wasmtime::component::Func, a9: wasmtime::component::Func, r1: wasmtime::component::Func, r2: wasmtime::component::Func, r3: wasmtime::component::Func, r4: wasmtime::component::Func, r5: wasmtime::component::Func, r6: wasmtime::component::Func, r7: wasmtime::component::Func, r8: wasmtime::component::Func, pair_ret: wasmtime::component::Func, } #[derive(Clone)] pub struct GuestIndices { a1: wasmtime::component::ComponentExportIndex, a2: wasmtime::component::ComponentExportIndex, a3: wasmtime::component::ComponentExportIndex, a4: wasmtime::component::ComponentExportIndex, a5: wasmtime::component::ComponentExportIndex, a6: wasmtime::component::ComponentExportIndex, a7: wasmtime::component::ComponentExportIndex, a8: wasmtime::component::ComponentExportIndex, a9: wasmtime::component::ComponentExportIndex, r1: wasmtime::component::ComponentExportIndex, r2: wasmtime::component::ComponentExportIndex, r3: wasmtime::component::ComponentExportIndex, r4: wasmtime::component::ComponentExportIndex, r5: wasmtime::component::ComponentExportIndex, r6: wasmtime::component::ComponentExportIndex, r7: wasmtime::component::ComponentExportIndex, r8: wasmtime::component::ComponentExportIndex, pair_ret: wasmtime::component::ComponentExportIndex, } impl GuestIndices { /// Constructor for [`GuestIndices`] which takes a /// [`Component`](wasmtime::component::Component) as input and can be executed /// before instantiation. /// /// This constructor can be used to front-load string lookups to find exports /// within a component. pub fn new( component: &wasmtime::component::Component, ) -> wasmtime::Result { let (_, instance) = component .export_index(None, "foo:foo/integers") .ok_or_else(|| { anyhow::anyhow!( "no exported instance named `foo:foo/integers`" ) })?; Self::_new(|name| { component.export_index(Some(&instance), name).map(|p| p.1) }) } /// This constructor is similar to [`GuestIndices::new`] except that it /// performs string lookups after instantiation time. pub fn new_instance( mut store: impl wasmtime::AsContextMut, instance: &wasmtime::component::Instance, ) -> wasmtime::Result { let instance_export = instance .get_export(&mut store, None, "foo:foo/integers") .ok_or_else(|| { anyhow::anyhow!( "no exported instance named `foo:foo/integers`" ) })?; Self::_new(|name| { instance.get_export(&mut store, Some(&instance_export), name) }) } fn _new( mut lookup: impl FnMut( &str, ) -> Option, ) -> wasmtime::Result { let mut lookup = move |name| { lookup(name) .ok_or_else(|| { anyhow::anyhow!( "instance export `foo:foo/integers` does \ not have export `{name}`" ) }) }; let _ = &mut lookup; let a1 = lookup("a1")?; let a2 = lookup("a2")?; let a3 = lookup("a3")?; let a4 = lookup("a4")?; let a5 = lookup("a5")?; let a6 = lookup("a6")?; let a7 = lookup("a7")?; let a8 = lookup("a8")?; let a9 = lookup("a9")?; let r1 = lookup("r1")?; let r2 = lookup("r2")?; let r3 = lookup("r3")?; let r4 = lookup("r4")?; let r5 = lookup("r5")?; let r6 = lookup("r6")?; let r7 = lookup("r7")?; let r8 = lookup("r8")?; let pair_ret = lookup("pair-ret")?; Ok(GuestIndices { a1, a2, a3, a4, a5, a6, a7, a8, a9, r1, r2, r3, r4, r5, r6, r7, r8, pair_ret, }) } pub fn load( &self, mut store: impl wasmtime::AsContextMut, instance: &wasmtime::component::Instance, ) -> wasmtime::Result { let mut store = store.as_context_mut(); let _ = &mut store; let _instance = instance; let a1 = *_instance .get_typed_func::<(u8,), ()>(&mut store, &self.a1)? .func(); let a2 = *_instance .get_typed_func::<(i8,), ()>(&mut store, &self.a2)? .func(); let a3 = *_instance .get_typed_func::<(u16,), ()>(&mut store, &self.a3)? .func(); let a4 = *_instance .get_typed_func::<(i16,), ()>(&mut store, &self.a4)? .func(); let a5 = *_instance .get_typed_func::<(u32,), ()>(&mut store, &self.a5)? .func(); let a6 = *_instance .get_typed_func::<(i32,), ()>(&mut store, &self.a6)? .func(); let a7 = *_instance .get_typed_func::<(u64,), ()>(&mut store, &self.a7)? .func(); let a8 = *_instance .get_typed_func::<(i64,), ()>(&mut store, &self.a8)? .func(); let a9 = *_instance .get_typed_func::< (u8, i8, u16, i16, u32, i32, u64, i64), (), >(&mut store, &self.a9)? .func(); let r1 = *_instance .get_typed_func::<(), (u8,)>(&mut store, &self.r1)? .func(); let r2 = *_instance .get_typed_func::<(), (i8,)>(&mut store, &self.r2)? .func(); let r3 = *_instance .get_typed_func::<(), (u16,)>(&mut store, &self.r3)? .func(); let r4 = *_instance .get_typed_func::<(), (i16,)>(&mut store, &self.r4)? .func(); let r5 = *_instance .get_typed_func::<(), (u32,)>(&mut store, &self.r5)? .func(); let r6 = *_instance .get_typed_func::<(), (i32,)>(&mut store, &self.r6)? .func(); let r7 = *_instance .get_typed_func::<(), (u64,)>(&mut store, &self.r7)? .func(); let r8 = *_instance .get_typed_func::<(), (i64,)>(&mut store, &self.r8)? .func(); let pair_ret = *_instance .get_typed_func::< (), ((i64, u8),), >(&mut store, &self.pair_ret)? .func(); Ok(Guest { a1, a2, a3, a4, a5, a6, a7, a8, a9, r1, r2, r3, r4, r5, r6, r7, r8, pair_ret, }) } } impl Guest { pub fn call_a1( &self, mut store: S, arg0: u8, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (u8,), (), >::new_unchecked(self.a1) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a2( &self, mut store: S, arg0: i8, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (i8,), (), >::new_unchecked(self.a2) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a3( &self, mut store: S, arg0: u16, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (u16,), (), >::new_unchecked(self.a3) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a4( &self, mut store: S, arg0: i16, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (i16,), (), >::new_unchecked(self.a4) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a5( &self, mut store: S, arg0: u32, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (u32,), (), >::new_unchecked(self.a5) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a6( &self, mut store: S, arg0: i32, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (i32,), (), >::new_unchecked(self.a6) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a7( &self, mut store: S, arg0: u64, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (u64,), (), >::new_unchecked(self.a7) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a8( &self, mut store: S, arg0: i64, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (i64,), (), >::new_unchecked(self.a8) }; let () = callee.call(store.as_context_mut(), (arg0,))?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_a9( &self, mut store: S, arg0: u8, arg1: i8, arg2: u16, arg3: i16, arg4: u32, arg5: i32, arg6: u64, arg7: i64, ) -> wasmtime::Result<()> { let callee = unsafe { wasmtime::component::TypedFunc::< (u8, i8, u16, i16, u32, i32, u64, i64), (), >::new_unchecked(self.a9) }; let () = callee .call( store.as_context_mut(), (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7), )?; callee.post_return(store.as_context_mut())?; Ok(()) } pub fn call_r1( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (u8,), >::new_unchecked(self.r1) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_r2( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (i8,), >::new_unchecked(self.r2) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_r3( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (u16,), >::new_unchecked(self.r3) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_r4( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (i16,), >::new_unchecked(self.r4) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_r5( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (u32,), >::new_unchecked(self.r5) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_r6( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (i32,), >::new_unchecked(self.r6) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_r7( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (u64,), >::new_unchecked(self.r7) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_r8( &self, mut store: S, ) -> wasmtime::Result { let callee = unsafe { wasmtime::component::TypedFunc::< (), (i64,), >::new_unchecked(self.r8) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } pub fn call_pair_ret( &self, mut store: S, ) -> wasmtime::Result<(i64, u8)> { let callee = unsafe { wasmtime::component::TypedFunc::< (), ((i64, u8),), >::new_unchecked(self.pair_ret) }; let (ret0,) = callee.call(store.as_context_mut(), ())?; callee.post_return(store.as_context_mut())?; Ok(ret0) } } } } } }