Path: blob/main/crates/component-macro/tests/expanded/integers_concurrent.rs
3073 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 {194fn a1<T: Send>(195accessor: &wasmtime::component::Accessor<T, Self>,196x: u8,197) -> impl ::core::future::Future<Output = ()> + Send;198fn a2<T: Send>(199accessor: &wasmtime::component::Accessor<T, Self>,200x: i8,201) -> impl ::core::future::Future<Output = ()> + Send;202fn a3<T: Send>(203accessor: &wasmtime::component::Accessor<T, Self>,204x: u16,205) -> impl ::core::future::Future<Output = ()> + Send;206fn a4<T: Send>(207accessor: &wasmtime::component::Accessor<T, Self>,208x: i16,209) -> impl ::core::future::Future<Output = ()> + Send;210fn a5<T: Send>(211accessor: &wasmtime::component::Accessor<T, Self>,212x: u32,213) -> impl ::core::future::Future<Output = ()> + Send;214fn a6<T: Send>(215accessor: &wasmtime::component::Accessor<T, Self>,216x: i32,217) -> impl ::core::future::Future<Output = ()> + Send;218fn a7<T: Send>(219accessor: &wasmtime::component::Accessor<T, Self>,220x: u64,221) -> impl ::core::future::Future<Output = ()> + Send;222fn a8<T: Send>(223accessor: &wasmtime::component::Accessor<T, Self>,224x: i64,225) -> impl ::core::future::Future<Output = ()> + Send;226fn a9<T: Send>(227accessor: &wasmtime::component::Accessor<T, Self>,228p1: u8,229p2: i8,230p3: u16,231p4: i16,232p5: u32,233p6: i32,234p7: u64,235p8: i64,236) -> impl ::core::future::Future<Output = ()> + Send;237fn r1<T: Send>(238accessor: &wasmtime::component::Accessor<T, Self>,239) -> impl ::core::future::Future<Output = u8> + Send;240fn r2<T: Send>(241accessor: &wasmtime::component::Accessor<T, Self>,242) -> impl ::core::future::Future<Output = i8> + Send;243fn r3<T: Send>(244accessor: &wasmtime::component::Accessor<T, Self>,245) -> impl ::core::future::Future<Output = u16> + Send;246fn r4<T: Send>(247accessor: &wasmtime::component::Accessor<T, Self>,248) -> impl ::core::future::Future<Output = i16> + Send;249fn r5<T: Send>(250accessor: &wasmtime::component::Accessor<T, Self>,251) -> impl ::core::future::Future<Output = u32> + Send;252fn r6<T: Send>(253accessor: &wasmtime::component::Accessor<T, Self>,254) -> impl ::core::future::Future<Output = i32> + Send;255fn r7<T: Send>(256accessor: &wasmtime::component::Accessor<T, Self>,257) -> impl ::core::future::Future<Output = u64> + Send;258fn r8<T: Send>(259accessor: &wasmtime::component::Accessor<T, Self>,260) -> impl ::core::future::Future<Output = i64> + Send;261fn pair_ret<T: Send>(262accessor: &wasmtime::component::Accessor<T, Self>,263) -> impl ::core::future::Future<Output = (i64, u8)> + Send;264}265pub trait Host: Send {}266impl<_T: Host + ?Sized + Send> Host for &mut _T {}267pub fn add_to_linker<T, D>(268linker: &mut wasmtime::component::Linker<T>,269host_getter: fn(&mut T) -> D::Data<'_>,270) -> wasmtime::Result<()>271where272D: HostWithStore,273for<'a> D::Data<'a>: Host,274T: 'static + Send,275{276let mut inst = linker.instance("foo:foo/integers")?;277inst.func_wrap_concurrent(278"a1",279move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u8,)| {280wasmtime::component::__internal::Box::pin(async move {281let host = &caller.with_getter(host_getter);282let r = <D as HostWithStore>::a1(host, arg0).await;283Ok(r)284})285},286)?;287inst.func_wrap_concurrent(288"a2",289move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i8,)| {290wasmtime::component::__internal::Box::pin(async move {291let host = &caller.with_getter(host_getter);292let r = <D as HostWithStore>::a2(host, arg0).await;293Ok(r)294})295},296)?;297inst.func_wrap_concurrent(298"a3",299move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u16,)| {300wasmtime::component::__internal::Box::pin(async move {301let host = &caller.with_getter(host_getter);302let r = <D as HostWithStore>::a3(host, arg0).await;303Ok(r)304})305},306)?;307inst.func_wrap_concurrent(308"a4",309move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i16,)| {310wasmtime::component::__internal::Box::pin(async move {311let host = &caller.with_getter(host_getter);312let r = <D as HostWithStore>::a4(host, arg0).await;313Ok(r)314})315},316)?;317inst.func_wrap_concurrent(318"a5",319move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u32,)| {320wasmtime::component::__internal::Box::pin(async move {321let host = &caller.with_getter(host_getter);322let r = <D as HostWithStore>::a5(host, arg0).await;323Ok(r)324})325},326)?;327inst.func_wrap_concurrent(328"a6",329move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i32,)| {330wasmtime::component::__internal::Box::pin(async move {331let host = &caller.with_getter(host_getter);332let r = <D as HostWithStore>::a6(host, arg0).await;333Ok(r)334})335},336)?;337inst.func_wrap_concurrent(338"a7",339move |caller: &wasmtime::component::Accessor<T>, (arg0,): (u64,)| {340wasmtime::component::__internal::Box::pin(async move {341let host = &caller.with_getter(host_getter);342let r = <D as HostWithStore>::a7(host, arg0).await;343Ok(r)344})345},346)?;347inst.func_wrap_concurrent(348"a8",349move |caller: &wasmtime::component::Accessor<T>, (arg0,): (i64,)| {350wasmtime::component::__internal::Box::pin(async move {351let host = &caller.with_getter(host_getter);352let r = <D as HostWithStore>::a8(host, arg0).await;353Ok(r)354})355},356)?;357inst.func_wrap_concurrent(358"a9",359move |360caller: &wasmtime::component::Accessor<T>,361(362arg0,363arg1,364arg2,365arg3,366arg4,367arg5,368arg6,369arg7,370): (u8, i8, u16, i16, u32, i32, u64, i64)|371{372wasmtime::component::__internal::Box::pin(async move {373let host = &caller.with_getter(host_getter);374let r = <D as HostWithStore>::a9(375host,376arg0,377arg1,378arg2,379arg3,380arg4,381arg5,382arg6,383arg7,384)385.await;386Ok(r)387})388},389)?;390inst.func_wrap_concurrent(391"r1",392move |caller: &wasmtime::component::Accessor<T>, (): ()| {393wasmtime::component::__internal::Box::pin(async move {394let host = &caller.with_getter(host_getter);395let r = <D as HostWithStore>::r1(host).await;396Ok((r,))397})398},399)?;400inst.func_wrap_concurrent(401"r2",402move |caller: &wasmtime::component::Accessor<T>, (): ()| {403wasmtime::component::__internal::Box::pin(async move {404let host = &caller.with_getter(host_getter);405let r = <D as HostWithStore>::r2(host).await;406Ok((r,))407})408},409)?;410inst.func_wrap_concurrent(411"r3",412move |caller: &wasmtime::component::Accessor<T>, (): ()| {413wasmtime::component::__internal::Box::pin(async move {414let host = &caller.with_getter(host_getter);415let r = <D as HostWithStore>::r3(host).await;416Ok((r,))417})418},419)?;420inst.func_wrap_concurrent(421"r4",422move |caller: &wasmtime::component::Accessor<T>, (): ()| {423wasmtime::component::__internal::Box::pin(async move {424let host = &caller.with_getter(host_getter);425let r = <D as HostWithStore>::r4(host).await;426Ok((r,))427})428},429)?;430inst.func_wrap_concurrent(431"r5",432move |caller: &wasmtime::component::Accessor<T>, (): ()| {433wasmtime::component::__internal::Box::pin(async move {434let host = &caller.with_getter(host_getter);435let r = <D as HostWithStore>::r5(host).await;436Ok((r,))437})438},439)?;440inst.func_wrap_concurrent(441"r6",442move |caller: &wasmtime::component::Accessor<T>, (): ()| {443wasmtime::component::__internal::Box::pin(async move {444let host = &caller.with_getter(host_getter);445let r = <D as HostWithStore>::r6(host).await;446Ok((r,))447})448},449)?;450inst.func_wrap_concurrent(451"r7",452move |caller: &wasmtime::component::Accessor<T>, (): ()| {453wasmtime::component::__internal::Box::pin(async move {454let host = &caller.with_getter(host_getter);455let r = <D as HostWithStore>::r7(host).await;456Ok((r,))457})458},459)?;460inst.func_wrap_concurrent(461"r8",462move |caller: &wasmtime::component::Accessor<T>, (): ()| {463wasmtime::component::__internal::Box::pin(async move {464let host = &caller.with_getter(host_getter);465let r = <D as HostWithStore>::r8(host).await;466Ok((r,))467})468},469)?;470inst.func_wrap_concurrent(471"pair-ret",472move |caller: &wasmtime::component::Accessor<T>, (): ()| {473wasmtime::component::__internal::Box::pin(async move {474let host = &caller.with_getter(host_getter);475let r = <D as HostWithStore>::pair_ret(host).await;476Ok((r,))477})478},479)?;480Ok(())481}482}483}484}485pub mod exports {486pub mod foo {487pub mod foo {488#[allow(clippy::all)]489pub mod integers {490#[allow(unused_imports)]491use wasmtime::component::__internal::Box;492#[derive(Clone)]493pub struct Guest {494a1: wasmtime::component::Func,495a2: wasmtime::component::Func,496a3: wasmtime::component::Func,497a4: wasmtime::component::Func,498a5: wasmtime::component::Func,499a6: wasmtime::component::Func,500a7: wasmtime::component::Func,501a8: wasmtime::component::Func,502a9: wasmtime::component::Func,503r1: wasmtime::component::Func,504r2: wasmtime::component::Func,505r3: wasmtime::component::Func,506r4: wasmtime::component::Func,507r5: wasmtime::component::Func,508r6: wasmtime::component::Func,509r7: wasmtime::component::Func,510r8: wasmtime::component::Func,511pair_ret: wasmtime::component::Func,512}513#[derive(Clone)]514pub struct GuestIndices {515a1: wasmtime::component::ComponentExportIndex,516a2: wasmtime::component::ComponentExportIndex,517a3: wasmtime::component::ComponentExportIndex,518a4: wasmtime::component::ComponentExportIndex,519a5: wasmtime::component::ComponentExportIndex,520a6: wasmtime::component::ComponentExportIndex,521a7: wasmtime::component::ComponentExportIndex,522a8: wasmtime::component::ComponentExportIndex,523a9: wasmtime::component::ComponentExportIndex,524r1: wasmtime::component::ComponentExportIndex,525r2: wasmtime::component::ComponentExportIndex,526r3: wasmtime::component::ComponentExportIndex,527r4: wasmtime::component::ComponentExportIndex,528r5: wasmtime::component::ComponentExportIndex,529r6: wasmtime::component::ComponentExportIndex,530r7: wasmtime::component::ComponentExportIndex,531r8: wasmtime::component::ComponentExportIndex,532pair_ret: wasmtime::component::ComponentExportIndex,533}534impl GuestIndices {535/// Constructor for [`GuestIndices`] which takes a536/// [`Component`](wasmtime::component::Component) as input and can be executed537/// before instantiation.538///539/// This constructor can be used to front-load string lookups to find exports540/// within a component.541pub fn new<_T>(542_instance_pre: &wasmtime::component::InstancePre<_T>,543) -> wasmtime::Result<GuestIndices> {544let instance = _instance_pre545.component()546.get_export_index(None, "foo:foo/integers")547.ok_or_else(|| {548wasmtime::format_err!(549"no exported instance named `foo:foo/integers`"550)551})?;552let mut lookup = move |name| {553_instance_pre554.component()555.get_export_index(Some(&instance), name)556.ok_or_else(|| {557wasmtime::format_err!(558"instance export `foo:foo/integers` does \559not have export `{name}`"560)561})562};563let _ = &mut lookup;564let a1 = lookup("a1")?;565let a2 = lookup("a2")?;566let a3 = lookup("a3")?;567let a4 = lookup("a4")?;568let a5 = lookup("a5")?;569let a6 = lookup("a6")?;570let a7 = lookup("a7")?;571let a8 = lookup("a8")?;572let a9 = lookup("a9")?;573let r1 = lookup("r1")?;574let r2 = lookup("r2")?;575let r3 = lookup("r3")?;576let r4 = lookup("r4")?;577let r5 = lookup("r5")?;578let r6 = lookup("r6")?;579let r7 = lookup("r7")?;580let r8 = lookup("r8")?;581let pair_ret = lookup("pair-ret")?;582Ok(GuestIndices {583a1,584a2,585a3,586a4,587a5,588a6,589a7,590a8,591a9,592r1,593r2,594r3,595r4,596r5,597r6,598r7,599r8,600pair_ret,601})602}603pub fn load(604&self,605mut store: impl wasmtime::AsContextMut,606instance: &wasmtime::component::Instance,607) -> wasmtime::Result<Guest> {608let _instance = instance;609let _instance_pre = _instance.instance_pre(&store);610let _instance_type = _instance_pre.instance_type();611let mut store = store.as_context_mut();612let _ = &mut store;613let a1 = *_instance614.get_typed_func::<(u8,), ()>(&mut store, &self.a1)?615.func();616let a2 = *_instance617.get_typed_func::<(i8,), ()>(&mut store, &self.a2)?618.func();619let a3 = *_instance620.get_typed_func::<(u16,), ()>(&mut store, &self.a3)?621.func();622let a4 = *_instance623.get_typed_func::<(i16,), ()>(&mut store, &self.a4)?624.func();625let a5 = *_instance626.get_typed_func::<(u32,), ()>(&mut store, &self.a5)?627.func();628let a6 = *_instance629.get_typed_func::<(i32,), ()>(&mut store, &self.a6)?630.func();631let a7 = *_instance632.get_typed_func::<(u64,), ()>(&mut store, &self.a7)?633.func();634let a8 = *_instance635.get_typed_func::<(i64,), ()>(&mut store, &self.a8)?636.func();637let a9 = *_instance638.get_typed_func::<639(u8, i8, u16, i16, u32, i32, u64, i64),640(),641>(&mut store, &self.a9)?642.func();643let r1 = *_instance644.get_typed_func::<(), (u8,)>(&mut store, &self.r1)?645.func();646let r2 = *_instance647.get_typed_func::<(), (i8,)>(&mut store, &self.r2)?648.func();649let r3 = *_instance650.get_typed_func::<(), (u16,)>(&mut store, &self.r3)?651.func();652let r4 = *_instance653.get_typed_func::<(), (i16,)>(&mut store, &self.r4)?654.func();655let r5 = *_instance656.get_typed_func::<(), (u32,)>(&mut store, &self.r5)?657.func();658let r6 = *_instance659.get_typed_func::<(), (i32,)>(&mut store, &self.r6)?660.func();661let r7 = *_instance662.get_typed_func::<(), (u64,)>(&mut store, &self.r7)?663.func();664let r8 = *_instance665.get_typed_func::<(), (i64,)>(&mut store, &self.r8)?666.func();667let pair_ret = *_instance668.get_typed_func::<669(),670((i64, u8),),671>(&mut store, &self.pair_ret)?672.func();673Ok(Guest {674a1,675a2,676a3,677a4,678a5,679a6,680a7,681a8,682a9,683r1,684r2,685r3,686r4,687r5,688r6,689r7,690r8,691pair_ret,692})693}694}695impl Guest {696pub async fn call_a1<_T, _D>(697&self,698accessor: &wasmtime::component::Accessor<_T, _D>,699arg0: u8,700) -> wasmtime::Result<()>701where702_T: Send,703_D: wasmtime::component::HasData,704{705let callee = unsafe {706wasmtime::component::TypedFunc::<707(u8,),708(),709>::new_unchecked(self.a1)710};711let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;712Ok(())713}714pub async fn call_a2<_T, _D>(715&self,716accessor: &wasmtime::component::Accessor<_T, _D>,717arg0: i8,718) -> wasmtime::Result<()>719where720_T: Send,721_D: wasmtime::component::HasData,722{723let callee = unsafe {724wasmtime::component::TypedFunc::<725(i8,),726(),727>::new_unchecked(self.a2)728};729let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;730Ok(())731}732pub async fn call_a3<_T, _D>(733&self,734accessor: &wasmtime::component::Accessor<_T, _D>,735arg0: u16,736) -> wasmtime::Result<()>737where738_T: Send,739_D: wasmtime::component::HasData,740{741let callee = unsafe {742wasmtime::component::TypedFunc::<743(u16,),744(),745>::new_unchecked(self.a3)746};747let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;748Ok(())749}750pub async fn call_a4<_T, _D>(751&self,752accessor: &wasmtime::component::Accessor<_T, _D>,753arg0: i16,754) -> wasmtime::Result<()>755where756_T: Send,757_D: wasmtime::component::HasData,758{759let callee = unsafe {760wasmtime::component::TypedFunc::<761(i16,),762(),763>::new_unchecked(self.a4)764};765let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;766Ok(())767}768pub async fn call_a5<_T, _D>(769&self,770accessor: &wasmtime::component::Accessor<_T, _D>,771arg0: u32,772) -> wasmtime::Result<()>773where774_T: Send,775_D: wasmtime::component::HasData,776{777let callee = unsafe {778wasmtime::component::TypedFunc::<779(u32,),780(),781>::new_unchecked(self.a5)782};783let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;784Ok(())785}786pub async fn call_a6<_T, _D>(787&self,788accessor: &wasmtime::component::Accessor<_T, _D>,789arg0: i32,790) -> wasmtime::Result<()>791where792_T: Send,793_D: wasmtime::component::HasData,794{795let callee = unsafe {796wasmtime::component::TypedFunc::<797(i32,),798(),799>::new_unchecked(self.a6)800};801let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;802Ok(())803}804pub async fn call_a7<_T, _D>(805&self,806accessor: &wasmtime::component::Accessor<_T, _D>,807arg0: u64,808) -> wasmtime::Result<()>809where810_T: Send,811_D: wasmtime::component::HasData,812{813let callee = unsafe {814wasmtime::component::TypedFunc::<815(u64,),816(),817>::new_unchecked(self.a7)818};819let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;820Ok(())821}822pub async fn call_a8<_T, _D>(823&self,824accessor: &wasmtime::component::Accessor<_T, _D>,825arg0: i64,826) -> wasmtime::Result<()>827where828_T: Send,829_D: wasmtime::component::HasData,830{831let callee = unsafe {832wasmtime::component::TypedFunc::<833(i64,),834(),835>::new_unchecked(self.a8)836};837let ((), _) = callee.call_concurrent(accessor, (arg0,)).await?;838Ok(())839}840pub async fn call_a9<_T, _D>(841&self,842accessor: &wasmtime::component::Accessor<_T, _D>,843arg0: u8,844arg1: i8,845arg2: u16,846arg3: i16,847arg4: u32,848arg5: i32,849arg6: u64,850arg7: i64,851) -> wasmtime::Result<()>852where853_T: Send,854_D: wasmtime::component::HasData,855{856let callee = unsafe {857wasmtime::component::TypedFunc::<858(u8, i8, u16, i16, u32, i32, u64, i64),859(),860>::new_unchecked(self.a9)861};862let ((), _) = callee863.call_concurrent(864accessor,865(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7),866)867.await?;868Ok(())869}870pub async fn call_r1<_T, _D>(871&self,872accessor: &wasmtime::component::Accessor<_T, _D>,873) -> wasmtime::Result<u8>874where875_T: Send,876_D: wasmtime::component::HasData,877{878let callee = unsafe {879wasmtime::component::TypedFunc::<880(),881(u8,),882>::new_unchecked(self.r1)883};884let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;885Ok(ret0)886}887pub async fn call_r2<_T, _D>(888&self,889accessor: &wasmtime::component::Accessor<_T, _D>,890) -> wasmtime::Result<i8>891where892_T: Send,893_D: wasmtime::component::HasData,894{895let callee = unsafe {896wasmtime::component::TypedFunc::<897(),898(i8,),899>::new_unchecked(self.r2)900};901let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;902Ok(ret0)903}904pub async fn call_r3<_T, _D>(905&self,906accessor: &wasmtime::component::Accessor<_T, _D>,907) -> wasmtime::Result<u16>908where909_T: Send,910_D: wasmtime::component::HasData,911{912let callee = unsafe {913wasmtime::component::TypedFunc::<914(),915(u16,),916>::new_unchecked(self.r3)917};918let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;919Ok(ret0)920}921pub async fn call_r4<_T, _D>(922&self,923accessor: &wasmtime::component::Accessor<_T, _D>,924) -> wasmtime::Result<i16>925where926_T: Send,927_D: wasmtime::component::HasData,928{929let callee = unsafe {930wasmtime::component::TypedFunc::<931(),932(i16,),933>::new_unchecked(self.r4)934};935let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;936Ok(ret0)937}938pub async fn call_r5<_T, _D>(939&self,940accessor: &wasmtime::component::Accessor<_T, _D>,941) -> wasmtime::Result<u32>942where943_T: Send,944_D: wasmtime::component::HasData,945{946let callee = unsafe {947wasmtime::component::TypedFunc::<948(),949(u32,),950>::new_unchecked(self.r5)951};952let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;953Ok(ret0)954}955pub async fn call_r6<_T, _D>(956&self,957accessor: &wasmtime::component::Accessor<_T, _D>,958) -> wasmtime::Result<i32>959where960_T: Send,961_D: wasmtime::component::HasData,962{963let callee = unsafe {964wasmtime::component::TypedFunc::<965(),966(i32,),967>::new_unchecked(self.r6)968};969let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;970Ok(ret0)971}972pub async fn call_r7<_T, _D>(973&self,974accessor: &wasmtime::component::Accessor<_T, _D>,975) -> wasmtime::Result<u64>976where977_T: Send,978_D: wasmtime::component::HasData,979{980let callee = unsafe {981wasmtime::component::TypedFunc::<982(),983(u64,),984>::new_unchecked(self.r7)985};986let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;987Ok(ret0)988}989pub async fn call_r8<_T, _D>(990&self,991accessor: &wasmtime::component::Accessor<_T, _D>,992) -> wasmtime::Result<i64>993where994_T: Send,995_D: wasmtime::component::HasData,996{997let callee = unsafe {998wasmtime::component::TypedFunc::<999(),1000(i64,),1001>::new_unchecked(self.r8)1002};1003let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1004Ok(ret0)1005}1006pub async fn call_pair_ret<_T, _D>(1007&self,1008accessor: &wasmtime::component::Accessor<_T, _D>,1009) -> wasmtime::Result<(i64, u8)>1010where1011_T: Send,1012_D: wasmtime::component::HasData,1013{1014let callee = unsafe {1015wasmtime::component::TypedFunc::<1016(),1017((i64, u8),),1018>::new_unchecked(self.pair_ret)1019};1020let ((ret0,), _) = callee.call_concurrent(accessor, ()).await?;1021Ok(ret0)1022}1023}1024}1025}1026}1027}102810291030