Path: blob/main/crates/component-macro/tests/expanded/integers_async.rs
3092 views
/// Auto-generated bindings for a pre-instantiated version of a1/// component which implements the world `the-world`.2///3/// This structure is created through [`TheWorldPre::new`] which4/// takes a [`InstancePre`](wasmtime::component::InstancePre) that5/// has been created through a [`Linker`](wasmtime::component::Linker).6///7/// For more information see [`TheWorld`] as well.8pub struct TheWorldPre<T: 'static> {9instance_pre: wasmtime::component::InstancePre<T>,10indices: TheWorldIndices,11}12impl<T: 'static> Clone for TheWorldPre<T> {13fn clone(&self) -> Self {14Self {15instance_pre: self.instance_pre.clone(),16indices: self.indices.clone(),17}18}19}20impl<_T: 'static> TheWorldPre<_T> {21/// Creates a new copy of `TheWorldPre` bindings which can then22/// be used to instantiate into a particular store.23///24/// This method may fail if the component behind `instance_pre`25/// does not have the required exports.26pub fn new(27instance_pre: wasmtime::component::InstancePre<_T>,28) -> wasmtime::Result<Self> {29let indices = TheWorldIndices::new(&instance_pre)?;30Ok(Self { instance_pre, indices })31}32pub fn engine(&self) -> &wasmtime::Engine {33self.instance_pre.engine()34}35pub fn instance_pre(&self) -> &wasmtime::component::InstancePre<_T> {36&self.instance_pre37}38/// Instantiates a new instance of [`TheWorld`] within the39/// `store` provided.40///41/// This function will use `self` as the pre-instantiated42/// instance to perform instantiation. Afterwards the preloaded43/// indices in `self` are used to lookup all exports on the44/// resulting instance.45pub fn instantiate(46&self,47mut store: impl wasmtime::AsContextMut<Data = _T>,48) -> wasmtime::Result<TheWorld> {49let mut store = store.as_context_mut();50let instance = self.instance_pre.instantiate(&mut store)?;51self.indices.load(&mut store, &instance)52}53}54impl<_T: Send + 'static> TheWorldPre<_T> {55/// Same as [`Self::instantiate`], except with `async`.56pub async fn instantiate_async(57&self,58mut store: impl wasmtime::AsContextMut<Data = _T>,59) -> wasmtime::Result<TheWorld> {60let mut store = store.as_context_mut();61let instance = self.instance_pre.instantiate_async(&mut store).await?;62self.indices.load(&mut store, &instance)63}64}65/// Auto-generated bindings for index of the exports of66/// `the-world`.67///68/// This is an implementation detail of [`TheWorldPre`] and can69/// be constructed if needed as well.70///71/// For more information see [`TheWorld`] as well.72#[derive(Clone)]73pub struct TheWorldIndices {74interface0: exports::foo::foo::integers::GuestIndices,75}76/// Auto-generated bindings for an instance a component which77/// implements the world `the-world`.78///79/// This structure can be created through a number of means80/// depending on your requirements and what you have on hand:81///82/// * The most convenient way is to use83/// [`TheWorld::instantiate`] which only needs a84/// [`Store`], [`Component`], and [`Linker`].85///86/// * Alternatively you can create a [`TheWorldPre`] ahead of87/// time with a [`Component`] to front-load string lookups88/// of exports once instead of per-instantiation. This89/// method then uses [`TheWorldPre::instantiate`] to90/// create a [`TheWorld`].91///92/// * If you've instantiated the instance yourself already93/// then you can use [`TheWorld::new`].94///95/// These methods are all equivalent to one another and move96/// around the tradeoff of what work is performed when.97///98/// [`Store`]: wasmtime::Store99/// [`Component`]: wasmtime::component::Component100/// [`Linker`]: wasmtime::component::Linker101pub struct TheWorld {102interface0: exports::foo::foo::integers::Guest,103}104const _: () = {105impl TheWorldIndices {106/// Creates a new copy of `TheWorldIndices` bindings which can then107/// be used to instantiate into a particular store.108///109/// This method may fail if the component does not have the110/// required exports.111pub fn new<_T>(112_instance_pre: &wasmtime::component::InstancePre<_T>,113) -> wasmtime::Result<Self> {114let _component = _instance_pre.component();115let _instance_type = _instance_pre.instance_type();116let interface0 = exports::foo::foo::integers::GuestIndices::new(117_instance_pre,118)?;119Ok(TheWorldIndices { interface0 })120}121/// Uses the indices stored in `self` to load an instance122/// of [`TheWorld`] from the instance provided.123///124/// Note that at this time this method will additionally125/// perform type-checks of all exports.126pub fn load(127&self,128mut store: impl wasmtime::AsContextMut,129instance: &wasmtime::component::Instance,130) -> wasmtime::Result<TheWorld> {131let _ = &mut store;132let _instance = instance;133let interface0 = self.interface0.load(&mut store, &_instance)?;134Ok(TheWorld { interface0 })135}136}137impl TheWorld {138/// Convenience wrapper around [`TheWorldPre::new`] and139/// [`TheWorldPre::instantiate`].140pub fn instantiate<_T>(141store: impl wasmtime::AsContextMut<Data = _T>,142component: &wasmtime::component::Component,143linker: &wasmtime::component::Linker<_T>,144) -> wasmtime::Result<TheWorld> {145let pre = linker.instantiate_pre(component)?;146TheWorldPre::new(pre)?.instantiate(store)147}148/// Convenience wrapper around [`TheWorldIndices::new`] and149/// [`TheWorldIndices::load`].150pub fn new(151mut store: impl wasmtime::AsContextMut,152instance: &wasmtime::component::Instance,153) -> wasmtime::Result<TheWorld> {154let indices = TheWorldIndices::new(&instance.instance_pre(&store))?;155indices.load(&mut store, instance)156}157/// Convenience wrapper around [`TheWorldPre::new`] and158/// [`TheWorldPre::instantiate_async`].159pub async fn instantiate_async<_T>(160store: impl wasmtime::AsContextMut<Data = _T>,161component: &wasmtime::component::Component,162linker: &wasmtime::component::Linker<_T>,163) -> wasmtime::Result<TheWorld>164where165_T: Send,166{167let pre = linker.instantiate_pre(component)?;168TheWorldPre::new(pre)?.instantiate_async(store).await169}170pub fn add_to_linker<T, D>(171linker: &mut wasmtime::component::Linker<T>,172host_getter: fn(&mut T) -> D::Data<'_>,173) -> wasmtime::Result<()>174where175D: foo::foo::integers::HostWithStore + Send,176for<'a> D::Data<'a>: foo::foo::integers::Host + Send,177T: 'static + Send,178{179foo::foo::integers::add_to_linker::<T, D>(linker, host_getter)?;180Ok(())181}182pub fn foo_foo_integers(&self) -> &exports::foo::foo::integers::Guest {183&self.interface0184}185}186};187pub mod foo {188pub mod foo {189#[allow(clippy::all)]190pub mod integers {191#[allow(unused_imports)]192use wasmtime::component::__internal::Box;193pub trait HostWithStore: wasmtime::component::HasData + Send {}194impl<_T: ?Sized> HostWithStore for _T195where196_T: wasmtime::component::HasData + Send,197{}198pub trait Host: Send {199fn a1(200&mut self,201x: u8,202) -> impl ::core::future::Future<Output = ()> + Send;203fn a2(204&mut self,205x: i8,206) -> impl ::core::future::Future<Output = ()> + Send;207fn a3(208&mut self,209x: u16,210) -> impl ::core::future::Future<Output = ()> + Send;211fn a4(212&mut self,213x: i16,214) -> impl ::core::future::Future<Output = ()> + Send;215fn a5(216&mut self,217x: u32,218) -> impl ::core::future::Future<Output = ()> + Send;219fn a6(220&mut self,221x: i32,222) -> impl ::core::future::Future<Output = ()> + Send;223fn a7(224&mut self,225x: u64,226) -> impl ::core::future::Future<Output = ()> + Send;227fn a8(228&mut self,229x: i64,230) -> impl ::core::future::Future<Output = ()> + Send;231fn a9(232&mut self,233p1: u8,234p2: i8,235p3: u16,236p4: i16,237p5: u32,238p6: i32,239p7: u64,240p8: i64,241) -> impl ::core::future::Future<Output = ()> + Send;242fn r1(&mut self) -> impl ::core::future::Future<Output = u8> + Send;243fn r2(&mut self) -> impl ::core::future::Future<Output = i8> + Send;244fn r3(&mut self) -> impl ::core::future::Future<Output = u16> + Send;245fn r4(&mut self) -> impl ::core::future::Future<Output = i16> + Send;246fn r5(&mut self) -> impl ::core::future::Future<Output = u32> + Send;247fn r6(&mut self) -> impl ::core::future::Future<Output = i32> + Send;248fn r7(&mut self) -> impl ::core::future::Future<Output = u64> + Send;249fn r8(&mut self) -> impl ::core::future::Future<Output = i64> + Send;250fn pair_ret(251&mut self,252) -> impl ::core::future::Future<Output = (i64, u8)> + Send;253}254impl<_T: Host + ?Sized + Send> Host for &mut _T {255fn a1(256&mut self,257x: u8,258) -> impl ::core::future::Future<Output = ()> + Send {259async move { Host::a1(*self, x).await }260}261fn a2(262&mut self,263x: i8,264) -> impl ::core::future::Future<Output = ()> + Send {265async move { Host::a2(*self, x).await }266}267fn a3(268&mut self,269x: u16,270) -> impl ::core::future::Future<Output = ()> + Send {271async move { Host::a3(*self, x).await }272}273fn a4(274&mut self,275x: i16,276) -> impl ::core::future::Future<Output = ()> + Send {277async move { Host::a4(*self, x).await }278}279fn a5(280&mut self,281x: u32,282) -> impl ::core::future::Future<Output = ()> + Send {283async move { Host::a5(*self, x).await }284}285fn a6(286&mut self,287x: i32,288) -> impl ::core::future::Future<Output = ()> + Send {289async move { Host::a6(*self, x).await }290}291fn a7(292&mut self,293x: u64,294) -> impl ::core::future::Future<Output = ()> + Send {295async move { Host::a7(*self, x).await }296}297fn a8(298&mut self,299x: i64,300) -> impl ::core::future::Future<Output = ()> + Send {301async move { Host::a8(*self, x).await }302}303fn a9(304&mut self,305p1: u8,306p2: i8,307p3: u16,308p4: i16,309p5: u32,310p6: i32,311p7: u64,312p8: i64,313) -> impl ::core::future::Future<Output = ()> + Send {314async move { Host::a9(*self, p1, p2, p3, p4, p5, p6, p7, p8).await }315}316fn r1(&mut self) -> impl ::core::future::Future<Output = u8> + Send {317async move { Host::r1(*self).await }318}319fn r2(&mut self) -> impl ::core::future::Future<Output = i8> + Send {320async move { Host::r2(*self).await }321}322fn r3(&mut self) -> impl ::core::future::Future<Output = u16> + Send {323async move { Host::r3(*self).await }324}325fn r4(&mut self) -> impl ::core::future::Future<Output = i16> + Send {326async move { Host::r4(*self).await }327}328fn r5(&mut self) -> impl ::core::future::Future<Output = u32> + Send {329async move { Host::r5(*self).await }330}331fn r6(&mut self) -> impl ::core::future::Future<Output = i32> + Send {332async move { Host::r6(*self).await }333}334fn r7(&mut self) -> impl ::core::future::Future<Output = u64> + Send {335async move { Host::r7(*self).await }336}337fn r8(&mut self) -> impl ::core::future::Future<Output = i64> + Send {338async move { Host::r8(*self).await }339}340fn pair_ret(341&mut self,342) -> impl ::core::future::Future<Output = (i64, u8)> + Send {343async move { Host::pair_ret(*self).await }344}345}346pub fn add_to_linker<T, D>(347linker: &mut wasmtime::component::Linker<T>,348host_getter: fn(&mut T) -> D::Data<'_>,349) -> wasmtime::Result<()>350where351D: HostWithStore,352for<'a> D::Data<'a>: Host,353T: 'static + Send,354{355let mut inst = linker.instance("foo:foo/integers")?;356inst.func_wrap_async(357"a1",358move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u8,)| {359wasmtime::component::__internal::Box::new(async move {360let host = &mut host_getter(caller.data_mut());361let r = Host::a1(host, arg0).await;362Ok(r)363})364},365)?;366inst.func_wrap_async(367"a2",368move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i8,)| {369wasmtime::component::__internal::Box::new(async move {370let host = &mut host_getter(caller.data_mut());371let r = Host::a2(host, arg0).await;372Ok(r)373})374},375)?;376inst.func_wrap_async(377"a3",378move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u16,)| {379wasmtime::component::__internal::Box::new(async move {380let host = &mut host_getter(caller.data_mut());381let r = Host::a3(host, arg0).await;382Ok(r)383})384},385)?;386inst.func_wrap_async(387"a4",388move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i16,)| {389wasmtime::component::__internal::Box::new(async move {390let host = &mut host_getter(caller.data_mut());391let r = Host::a4(host, arg0).await;392Ok(r)393})394},395)?;396inst.func_wrap_async(397"a5",398move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u32,)| {399wasmtime::component::__internal::Box::new(async move {400let host = &mut host_getter(caller.data_mut());401let r = Host::a5(host, arg0).await;402Ok(r)403})404},405)?;406inst.func_wrap_async(407"a6",408move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i32,)| {409wasmtime::component::__internal::Box::new(async move {410let host = &mut host_getter(caller.data_mut());411let r = Host::a6(host, arg0).await;412Ok(r)413})414},415)?;416inst.func_wrap_async(417"a7",418move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u64,)| {419wasmtime::component::__internal::Box::new(async move {420let host = &mut host_getter(caller.data_mut());421let r = Host::a7(host, arg0).await;422Ok(r)423})424},425)?;426inst.func_wrap_async(427"a8",428move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i64,)| {429wasmtime::component::__internal::Box::new(async move {430let host = &mut host_getter(caller.data_mut());431let r = Host::a8(host, arg0).await;432Ok(r)433})434},435)?;436inst.func_wrap_async(437"a9",438move |439mut caller: wasmtime::StoreContextMut<'_, T>,440(441arg0,442arg1,443arg2,444arg3,445arg4,446arg5,447arg6,448arg7,449): (u8, i8, u16, i16, u32, i32, u64, i64)|450{451wasmtime::component::__internal::Box::new(async move {452let host = &mut host_getter(caller.data_mut());453let r = Host::a9(454host,455arg0,456arg1,457arg2,458arg3,459arg4,460arg5,461arg6,462arg7,463)464.await;465Ok(r)466})467},468)?;469inst.func_wrap_async(470"r1",471move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {472wasmtime::component::__internal::Box::new(async move {473let host = &mut host_getter(caller.data_mut());474let r = Host::r1(host).await;475Ok((r,))476})477},478)?;479inst.func_wrap_async(480"r2",481move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {482wasmtime::component::__internal::Box::new(async move {483let host = &mut host_getter(caller.data_mut());484let r = Host::r2(host).await;485Ok((r,))486})487},488)?;489inst.func_wrap_async(490"r3",491move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {492wasmtime::component::__internal::Box::new(async move {493let host = &mut host_getter(caller.data_mut());494let r = Host::r3(host).await;495Ok((r,))496})497},498)?;499inst.func_wrap_async(500"r4",501move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {502wasmtime::component::__internal::Box::new(async move {503let host = &mut host_getter(caller.data_mut());504let r = Host::r4(host).await;505Ok((r,))506})507},508)?;509inst.func_wrap_async(510"r5",511move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {512wasmtime::component::__internal::Box::new(async move {513let host = &mut host_getter(caller.data_mut());514let r = Host::r5(host).await;515Ok((r,))516})517},518)?;519inst.func_wrap_async(520"r6",521move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {522wasmtime::component::__internal::Box::new(async move {523let host = &mut host_getter(caller.data_mut());524let r = Host::r6(host).await;525Ok((r,))526})527},528)?;529inst.func_wrap_async(530"r7",531move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {532wasmtime::component::__internal::Box::new(async move {533let host = &mut host_getter(caller.data_mut());534let r = Host::r7(host).await;535Ok((r,))536})537},538)?;539inst.func_wrap_async(540"r8",541move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {542wasmtime::component::__internal::Box::new(async move {543let host = &mut host_getter(caller.data_mut());544let r = Host::r8(host).await;545Ok((r,))546})547},548)?;549inst.func_wrap_async(550"pair-ret",551move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {552wasmtime::component::__internal::Box::new(async move {553let host = &mut host_getter(caller.data_mut());554let r = Host::pair_ret(host).await;555Ok((r,))556})557},558)?;559Ok(())560}561}562}563}564pub mod exports {565pub mod foo {566pub mod foo {567#[allow(clippy::all)]568pub mod integers {569#[allow(unused_imports)]570use wasmtime::component::__internal::Box;571#[derive(Clone)]572pub struct Guest {573a1: wasmtime::component::Func,574a2: wasmtime::component::Func,575a3: wasmtime::component::Func,576a4: wasmtime::component::Func,577a5: wasmtime::component::Func,578a6: wasmtime::component::Func,579a7: wasmtime::component::Func,580a8: wasmtime::component::Func,581a9: wasmtime::component::Func,582r1: wasmtime::component::Func,583r2: wasmtime::component::Func,584r3: wasmtime::component::Func,585r4: wasmtime::component::Func,586r5: wasmtime::component::Func,587r6: wasmtime::component::Func,588r7: wasmtime::component::Func,589r8: wasmtime::component::Func,590pair_ret: wasmtime::component::Func,591}592#[derive(Clone)]593pub struct GuestIndices {594a1: wasmtime::component::ComponentExportIndex,595a2: wasmtime::component::ComponentExportIndex,596a3: wasmtime::component::ComponentExportIndex,597a4: wasmtime::component::ComponentExportIndex,598a5: wasmtime::component::ComponentExportIndex,599a6: wasmtime::component::ComponentExportIndex,600a7: wasmtime::component::ComponentExportIndex,601a8: wasmtime::component::ComponentExportIndex,602a9: wasmtime::component::ComponentExportIndex,603r1: wasmtime::component::ComponentExportIndex,604r2: wasmtime::component::ComponentExportIndex,605r3: wasmtime::component::ComponentExportIndex,606r4: wasmtime::component::ComponentExportIndex,607r5: wasmtime::component::ComponentExportIndex,608r6: wasmtime::component::ComponentExportIndex,609r7: wasmtime::component::ComponentExportIndex,610r8: wasmtime::component::ComponentExportIndex,611pair_ret: wasmtime::component::ComponentExportIndex,612}613impl GuestIndices {614/// Constructor for [`GuestIndices`] which takes a615/// [`Component`](wasmtime::component::Component) as input and can be executed616/// before instantiation.617///618/// This constructor can be used to front-load string lookups to find exports619/// within a component.620pub fn new<_T>(621_instance_pre: &wasmtime::component::InstancePre<_T>,622) -> wasmtime::Result<GuestIndices> {623let instance = _instance_pre624.component()625.get_export_index(None, "foo:foo/integers")626.ok_or_else(|| {627wasmtime::format_err!(628"no exported instance named `foo:foo/integers`"629)630})?;631let mut lookup = move |name| {632_instance_pre633.component()634.get_export_index(Some(&instance), name)635.ok_or_else(|| {636wasmtime::format_err!(637"instance export `foo:foo/integers` does \638not have export `{name}`"639)640})641};642let _ = &mut lookup;643let a1 = lookup("a1")?;644let a2 = lookup("a2")?;645let a3 = lookup("a3")?;646let a4 = lookup("a4")?;647let a5 = lookup("a5")?;648let a6 = lookup("a6")?;649let a7 = lookup("a7")?;650let a8 = lookup("a8")?;651let a9 = lookup("a9")?;652let r1 = lookup("r1")?;653let r2 = lookup("r2")?;654let r3 = lookup("r3")?;655let r4 = lookup("r4")?;656let r5 = lookup("r5")?;657let r6 = lookup("r6")?;658let r7 = lookup("r7")?;659let r8 = lookup("r8")?;660let pair_ret = lookup("pair-ret")?;661Ok(GuestIndices {662a1,663a2,664a3,665a4,666a5,667a6,668a7,669a8,670a9,671r1,672r2,673r3,674r4,675r5,676r6,677r7,678r8,679pair_ret,680})681}682pub fn load(683&self,684mut store: impl wasmtime::AsContextMut,685instance: &wasmtime::component::Instance,686) -> wasmtime::Result<Guest> {687let _instance = instance;688let _instance_pre = _instance.instance_pre(&store);689let _instance_type = _instance_pre.instance_type();690let mut store = store.as_context_mut();691let _ = &mut store;692let a1 = *_instance693.get_typed_func::<(u8,), ()>(&mut store, &self.a1)?694.func();695let a2 = *_instance696.get_typed_func::<(i8,), ()>(&mut store, &self.a2)?697.func();698let a3 = *_instance699.get_typed_func::<(u16,), ()>(&mut store, &self.a3)?700.func();701let a4 = *_instance702.get_typed_func::<(i16,), ()>(&mut store, &self.a4)?703.func();704let a5 = *_instance705.get_typed_func::<(u32,), ()>(&mut store, &self.a5)?706.func();707let a6 = *_instance708.get_typed_func::<(i32,), ()>(&mut store, &self.a6)?709.func();710let a7 = *_instance711.get_typed_func::<(u64,), ()>(&mut store, &self.a7)?712.func();713let a8 = *_instance714.get_typed_func::<(i64,), ()>(&mut store, &self.a8)?715.func();716let a9 = *_instance717.get_typed_func::<718(u8, i8, u16, i16, u32, i32, u64, i64),719(),720>(&mut store, &self.a9)?721.func();722let r1 = *_instance723.get_typed_func::<(), (u8,)>(&mut store, &self.r1)?724.func();725let r2 = *_instance726.get_typed_func::<(), (i8,)>(&mut store, &self.r2)?727.func();728let r3 = *_instance729.get_typed_func::<(), (u16,)>(&mut store, &self.r3)?730.func();731let r4 = *_instance732.get_typed_func::<(), (i16,)>(&mut store, &self.r4)?733.func();734let r5 = *_instance735.get_typed_func::<(), (u32,)>(&mut store, &self.r5)?736.func();737let r6 = *_instance738.get_typed_func::<(), (i32,)>(&mut store, &self.r6)?739.func();740let r7 = *_instance741.get_typed_func::<(), (u64,)>(&mut store, &self.r7)?742.func();743let r8 = *_instance744.get_typed_func::<(), (i64,)>(&mut store, &self.r8)?745.func();746let pair_ret = *_instance747.get_typed_func::<748(),749((i64, u8),),750>(&mut store, &self.pair_ret)?751.func();752Ok(Guest {753a1,754a2,755a3,756a4,757a5,758a6,759a7,760a8,761a9,762r1,763r2,764r3,765r4,766r5,767r6,768r7,769r8,770pair_ret,771})772}773}774impl Guest {775pub async fn call_a1<S: wasmtime::AsContextMut>(776&self,777mut store: S,778arg0: u8,779) -> wasmtime::Result<()>780where781<S as wasmtime::AsContext>::Data: Send,782{783let callee = unsafe {784wasmtime::component::TypedFunc::<785(u8,),786(),787>::new_unchecked(self.a1)788};789let () = callee790.call_async(store.as_context_mut(), (arg0,))791.await?;792Ok(())793}794pub async fn call_a2<S: wasmtime::AsContextMut>(795&self,796mut store: S,797arg0: i8,798) -> wasmtime::Result<()>799where800<S as wasmtime::AsContext>::Data: Send,801{802let callee = unsafe {803wasmtime::component::TypedFunc::<804(i8,),805(),806>::new_unchecked(self.a2)807};808let () = callee809.call_async(store.as_context_mut(), (arg0,))810.await?;811Ok(())812}813pub async fn call_a3<S: wasmtime::AsContextMut>(814&self,815mut store: S,816arg0: u16,817) -> wasmtime::Result<()>818where819<S as wasmtime::AsContext>::Data: Send,820{821let callee = unsafe {822wasmtime::component::TypedFunc::<823(u16,),824(),825>::new_unchecked(self.a3)826};827let () = callee828.call_async(store.as_context_mut(), (arg0,))829.await?;830Ok(())831}832pub async fn call_a4<S: wasmtime::AsContextMut>(833&self,834mut store: S,835arg0: i16,836) -> wasmtime::Result<()>837where838<S as wasmtime::AsContext>::Data: Send,839{840let callee = unsafe {841wasmtime::component::TypedFunc::<842(i16,),843(),844>::new_unchecked(self.a4)845};846let () = callee847.call_async(store.as_context_mut(), (arg0,))848.await?;849Ok(())850}851pub async fn call_a5<S: wasmtime::AsContextMut>(852&self,853mut store: S,854arg0: u32,855) -> wasmtime::Result<()>856where857<S as wasmtime::AsContext>::Data: Send,858{859let callee = unsafe {860wasmtime::component::TypedFunc::<861(u32,),862(),863>::new_unchecked(self.a5)864};865let () = callee866.call_async(store.as_context_mut(), (arg0,))867.await?;868Ok(())869}870pub async fn call_a6<S: wasmtime::AsContextMut>(871&self,872mut store: S,873arg0: i32,874) -> wasmtime::Result<()>875where876<S as wasmtime::AsContext>::Data: Send,877{878let callee = unsafe {879wasmtime::component::TypedFunc::<880(i32,),881(),882>::new_unchecked(self.a6)883};884let () = callee885.call_async(store.as_context_mut(), (arg0,))886.await?;887Ok(())888}889pub async fn call_a7<S: wasmtime::AsContextMut>(890&self,891mut store: S,892arg0: u64,893) -> wasmtime::Result<()>894where895<S as wasmtime::AsContext>::Data: Send,896{897let callee = unsafe {898wasmtime::component::TypedFunc::<899(u64,),900(),901>::new_unchecked(self.a7)902};903let () = callee904.call_async(store.as_context_mut(), (arg0,))905.await?;906Ok(())907}908pub async fn call_a8<S: wasmtime::AsContextMut>(909&self,910mut store: S,911arg0: i64,912) -> wasmtime::Result<()>913where914<S as wasmtime::AsContext>::Data: Send,915{916let callee = unsafe {917wasmtime::component::TypedFunc::<918(i64,),919(),920>::new_unchecked(self.a8)921};922let () = callee923.call_async(store.as_context_mut(), (arg0,))924.await?;925Ok(())926}927pub async fn call_a9<S: wasmtime::AsContextMut>(928&self,929mut store: S,930arg0: u8,931arg1: i8,932arg2: u16,933arg3: i16,934arg4: u32,935arg5: i32,936arg6: u64,937arg7: i64,938) -> wasmtime::Result<()>939where940<S as wasmtime::AsContext>::Data: Send,941{942let callee = unsafe {943wasmtime::component::TypedFunc::<944(u8, i8, u16, i16, u32, i32, u64, i64),945(),946>::new_unchecked(self.a9)947};948let () = callee949.call_async(950store.as_context_mut(),951(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7),952)953.await?;954Ok(())955}956pub async fn call_r1<S: wasmtime::AsContextMut>(957&self,958mut store: S,959) -> wasmtime::Result<u8>960where961<S as wasmtime::AsContext>::Data: Send,962{963let callee = unsafe {964wasmtime::component::TypedFunc::<965(),966(u8,),967>::new_unchecked(self.r1)968};969let (ret0,) = callee970.call_async(store.as_context_mut(), ())971.await?;972Ok(ret0)973}974pub async fn call_r2<S: wasmtime::AsContextMut>(975&self,976mut store: S,977) -> wasmtime::Result<i8>978where979<S as wasmtime::AsContext>::Data: Send,980{981let callee = unsafe {982wasmtime::component::TypedFunc::<983(),984(i8,),985>::new_unchecked(self.r2)986};987let (ret0,) = callee988.call_async(store.as_context_mut(), ())989.await?;990Ok(ret0)991}992pub async fn call_r3<S: wasmtime::AsContextMut>(993&self,994mut store: S,995) -> wasmtime::Result<u16>996where997<S as wasmtime::AsContext>::Data: Send,998{999let callee = unsafe {1000wasmtime::component::TypedFunc::<1001(),1002(u16,),1003>::new_unchecked(self.r3)1004};1005let (ret0,) = callee1006.call_async(store.as_context_mut(), ())1007.await?;1008Ok(ret0)1009}1010pub async fn call_r4<S: wasmtime::AsContextMut>(1011&self,1012mut store: S,1013) -> wasmtime::Result<i16>1014where1015<S as wasmtime::AsContext>::Data: Send,1016{1017let callee = unsafe {1018wasmtime::component::TypedFunc::<1019(),1020(i16,),1021>::new_unchecked(self.r4)1022};1023let (ret0,) = callee1024.call_async(store.as_context_mut(), ())1025.await?;1026Ok(ret0)1027}1028pub async fn call_r5<S: wasmtime::AsContextMut>(1029&self,1030mut store: S,1031) -> wasmtime::Result<u32>1032where1033<S as wasmtime::AsContext>::Data: Send,1034{1035let callee = unsafe {1036wasmtime::component::TypedFunc::<1037(),1038(u32,),1039>::new_unchecked(self.r5)1040};1041let (ret0,) = callee1042.call_async(store.as_context_mut(), ())1043.await?;1044Ok(ret0)1045}1046pub async fn call_r6<S: wasmtime::AsContextMut>(1047&self,1048mut store: S,1049) -> wasmtime::Result<i32>1050where1051<S as wasmtime::AsContext>::Data: Send,1052{1053let callee = unsafe {1054wasmtime::component::TypedFunc::<1055(),1056(i32,),1057>::new_unchecked(self.r6)1058};1059let (ret0,) = callee1060.call_async(store.as_context_mut(), ())1061.await?;1062Ok(ret0)1063}1064pub async fn call_r7<S: wasmtime::AsContextMut>(1065&self,1066mut store: S,1067) -> wasmtime::Result<u64>1068where1069<S as wasmtime::AsContext>::Data: Send,1070{1071let callee = unsafe {1072wasmtime::component::TypedFunc::<1073(),1074(u64,),1075>::new_unchecked(self.r7)1076};1077let (ret0,) = callee1078.call_async(store.as_context_mut(), ())1079.await?;1080Ok(ret0)1081}1082pub async fn call_r8<S: wasmtime::AsContextMut>(1083&self,1084mut store: S,1085) -> wasmtime::Result<i64>1086where1087<S as wasmtime::AsContext>::Data: Send,1088{1089let callee = unsafe {1090wasmtime::component::TypedFunc::<1091(),1092(i64,),1093>::new_unchecked(self.r8)1094};1095let (ret0,) = callee1096.call_async(store.as_context_mut(), ())1097.await?;1098Ok(ret0)1099}1100pub async fn call_pair_ret<S: wasmtime::AsContextMut>(1101&self,1102mut store: S,1103) -> wasmtime::Result<(i64, u8)>1104where1105<S as wasmtime::AsContext>::Data: Send,1106{1107let callee = unsafe {1108wasmtime::component::TypedFunc::<1109(),1110((i64, u8),),1111>::new_unchecked(self.pair_ret)1112};1113let (ret0,) = callee1114.call_async(store.as_context_mut(), ())1115.await?;1116Ok(ret0)1117}1118}1119}1120}1121}1122}112311241125