Path: blob/main/crates/component-macro/tests/expanded/integers.rs
1692 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 _: () = {105#[allow(unused_imports)]106use wasmtime::component::__internal::anyhow;107impl TheWorldIndices {108/// Creates a new copy of `TheWorldIndices` bindings which can then109/// be used to instantiate into a particular store.110///111/// This method may fail if the component does not have the112/// required exports.113pub fn new<_T>(114_instance_pre: &wasmtime::component::InstancePre<_T>,115) -> wasmtime::Result<Self> {116let _component = _instance_pre.component();117let _instance_type = _instance_pre.instance_type();118let interface0 = exports::foo::foo::integers::GuestIndices::new(119_instance_pre,120)?;121Ok(TheWorldIndices { interface0 })122}123/// Uses the indices stored in `self` to load an instance124/// of [`TheWorld`] from the instance provided.125///126/// Note that at this time this method will additionally127/// perform type-checks of all exports.128pub fn load(129&self,130mut store: impl wasmtime::AsContextMut,131instance: &wasmtime::component::Instance,132) -> wasmtime::Result<TheWorld> {133let _ = &mut store;134let _instance = instance;135let interface0 = self.interface0.load(&mut store, &_instance)?;136Ok(TheWorld { interface0 })137}138}139impl TheWorld {140/// Convenience wrapper around [`TheWorldPre::new`] and141/// [`TheWorldPre::instantiate`].142pub fn instantiate<_T>(143store: impl wasmtime::AsContextMut<Data = _T>,144component: &wasmtime::component::Component,145linker: &wasmtime::component::Linker<_T>,146) -> wasmtime::Result<TheWorld> {147let pre = linker.instantiate_pre(component)?;148TheWorldPre::new(pre)?.instantiate(store)149}150/// Convenience wrapper around [`TheWorldIndices::new`] and151/// [`TheWorldIndices::load`].152pub fn new(153mut store: impl wasmtime::AsContextMut,154instance: &wasmtime::component::Instance,155) -> wasmtime::Result<TheWorld> {156let indices = TheWorldIndices::new(&instance.instance_pre(&store))?;157indices.load(&mut store, instance)158}159/// Convenience wrapper around [`TheWorldPre::new`] and160/// [`TheWorldPre::instantiate_async`].161pub async fn instantiate_async<_T>(162store: impl wasmtime::AsContextMut<Data = _T>,163component: &wasmtime::component::Component,164linker: &wasmtime::component::Linker<_T>,165) -> wasmtime::Result<TheWorld>166where167_T: Send,168{169let pre = linker.instantiate_pre(component)?;170TheWorldPre::new(pre)?.instantiate_async(store).await171}172pub fn add_to_linker<T, D>(173linker: &mut wasmtime::component::Linker<T>,174host_getter: fn(&mut T) -> D::Data<'_>,175) -> wasmtime::Result<()>176where177D: foo::foo::integers::HostWithStore,178for<'a> D::Data<'a>: foo::foo::integers::Host,179T: 'static,180{181foo::foo::integers::add_to_linker::<T, D>(linker, host_getter)?;182Ok(())183}184pub fn foo_foo_integers(&self) -> &exports::foo::foo::integers::Guest {185&self.interface0186}187}188};189pub mod foo {190pub mod foo {191#[allow(clippy::all)]192pub mod integers {193#[allow(unused_imports)]194use wasmtime::component::__internal::{anyhow, Box};195pub trait HostWithStore: wasmtime::component::HasData {}196impl<_T: ?Sized> HostWithStore for _T197where198_T: wasmtime::component::HasData,199{}200pub trait Host {201fn a1(&mut self, x: u8) -> ();202fn a2(&mut self, x: i8) -> ();203fn a3(&mut self, x: u16) -> ();204fn a4(&mut self, x: i16) -> ();205fn a5(&mut self, x: u32) -> ();206fn a6(&mut self, x: i32) -> ();207fn a7(&mut self, x: u64) -> ();208fn a8(&mut self, x: i64) -> ();209fn a9(210&mut self,211p1: u8,212p2: i8,213p3: u16,214p4: i16,215p5: u32,216p6: i32,217p7: u64,218p8: i64,219) -> ();220fn r1(&mut self) -> u8;221fn r2(&mut self) -> i8;222fn r3(&mut self) -> u16;223fn r4(&mut self) -> i16;224fn r5(&mut self) -> u32;225fn r6(&mut self) -> i32;226fn r7(&mut self) -> u64;227fn r8(&mut self) -> i64;228fn pair_ret(&mut self) -> (i64, u8);229}230impl<_T: Host + ?Sized> Host for &mut _T {231fn a1(&mut self, x: u8) -> () {232Host::a1(*self, x)233}234fn a2(&mut self, x: i8) -> () {235Host::a2(*self, x)236}237fn a3(&mut self, x: u16) -> () {238Host::a3(*self, x)239}240fn a4(&mut self, x: i16) -> () {241Host::a4(*self, x)242}243fn a5(&mut self, x: u32) -> () {244Host::a5(*self, x)245}246fn a6(&mut self, x: i32) -> () {247Host::a6(*self, x)248}249fn a7(&mut self, x: u64) -> () {250Host::a7(*self, x)251}252fn a8(&mut self, x: i64) -> () {253Host::a8(*self, x)254}255fn a9(256&mut self,257p1: u8,258p2: i8,259p3: u16,260p4: i16,261p5: u32,262p6: i32,263p7: u64,264p8: i64,265) -> () {266Host::a9(*self, p1, p2, p3, p4, p5, p6, p7, p8)267}268fn r1(&mut self) -> u8 {269Host::r1(*self)270}271fn r2(&mut self) -> i8 {272Host::r2(*self)273}274fn r3(&mut self) -> u16 {275Host::r3(*self)276}277fn r4(&mut self) -> i16 {278Host::r4(*self)279}280fn r5(&mut self) -> u32 {281Host::r5(*self)282}283fn r6(&mut self) -> i32 {284Host::r6(*self)285}286fn r7(&mut self) -> u64 {287Host::r7(*self)288}289fn r8(&mut self) -> i64 {290Host::r8(*self)291}292fn pair_ret(&mut self) -> (i64, u8) {293Host::pair_ret(*self)294}295}296pub fn add_to_linker<T, D>(297linker: &mut wasmtime::component::Linker<T>,298host_getter: fn(&mut T) -> D::Data<'_>,299) -> wasmtime::Result<()>300where301D: HostWithStore,302for<'a> D::Data<'a>: Host,303T: 'static,304{305let mut inst = linker.instance("foo:foo/integers")?;306inst.func_wrap(307"a1",308move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u8,)| {309let host = &mut host_getter(caller.data_mut());310let r = Host::a1(host, arg0);311Ok(r)312},313)?;314inst.func_wrap(315"a2",316move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i8,)| {317let host = &mut host_getter(caller.data_mut());318let r = Host::a2(host, arg0);319Ok(r)320},321)?;322inst.func_wrap(323"a3",324move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u16,)| {325let host = &mut host_getter(caller.data_mut());326let r = Host::a3(host, arg0);327Ok(r)328},329)?;330inst.func_wrap(331"a4",332move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i16,)| {333let host = &mut host_getter(caller.data_mut());334let r = Host::a4(host, arg0);335Ok(r)336},337)?;338inst.func_wrap(339"a5",340move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u32,)| {341let host = &mut host_getter(caller.data_mut());342let r = Host::a5(host, arg0);343Ok(r)344},345)?;346inst.func_wrap(347"a6",348move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i32,)| {349let host = &mut host_getter(caller.data_mut());350let r = Host::a6(host, arg0);351Ok(r)352},353)?;354inst.func_wrap(355"a7",356move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u64,)| {357let host = &mut host_getter(caller.data_mut());358let r = Host::a7(host, arg0);359Ok(r)360},361)?;362inst.func_wrap(363"a8",364move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i64,)| {365let host = &mut host_getter(caller.data_mut());366let r = Host::a8(host, arg0);367Ok(r)368},369)?;370inst.func_wrap(371"a9",372move |373mut caller: wasmtime::StoreContextMut<'_, T>,374(375arg0,376arg1,377arg2,378arg3,379arg4,380arg5,381arg6,382arg7,383): (u8, i8, u16, i16, u32, i32, u64, i64)|384{385let host = &mut host_getter(caller.data_mut());386let r = Host::a9(387host,388arg0,389arg1,390arg2,391arg3,392arg4,393arg5,394arg6,395arg7,396);397Ok(r)398},399)?;400inst.func_wrap(401"r1",402move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {403let host = &mut host_getter(caller.data_mut());404let r = Host::r1(host);405Ok((r,))406},407)?;408inst.func_wrap(409"r2",410move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {411let host = &mut host_getter(caller.data_mut());412let r = Host::r2(host);413Ok((r,))414},415)?;416inst.func_wrap(417"r3",418move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {419let host = &mut host_getter(caller.data_mut());420let r = Host::r3(host);421Ok((r,))422},423)?;424inst.func_wrap(425"r4",426move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {427let host = &mut host_getter(caller.data_mut());428let r = Host::r4(host);429Ok((r,))430},431)?;432inst.func_wrap(433"r5",434move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {435let host = &mut host_getter(caller.data_mut());436let r = Host::r5(host);437Ok((r,))438},439)?;440inst.func_wrap(441"r6",442move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {443let host = &mut host_getter(caller.data_mut());444let r = Host::r6(host);445Ok((r,))446},447)?;448inst.func_wrap(449"r7",450move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {451let host = &mut host_getter(caller.data_mut());452let r = Host::r7(host);453Ok((r,))454},455)?;456inst.func_wrap(457"r8",458move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {459let host = &mut host_getter(caller.data_mut());460let r = Host::r8(host);461Ok((r,))462},463)?;464inst.func_wrap(465"pair-ret",466move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {467let host = &mut host_getter(caller.data_mut());468let r = Host::pair_ret(host);469Ok((r,))470},471)?;472Ok(())473}474}475}476}477pub mod exports {478pub mod foo {479pub mod foo {480#[allow(clippy::all)]481pub mod integers {482#[allow(unused_imports)]483use wasmtime::component::__internal::{anyhow, Box};484pub struct Guest {485a1: wasmtime::component::Func,486a2: wasmtime::component::Func,487a3: wasmtime::component::Func,488a4: wasmtime::component::Func,489a5: wasmtime::component::Func,490a6: wasmtime::component::Func,491a7: wasmtime::component::Func,492a8: wasmtime::component::Func,493a9: wasmtime::component::Func,494r1: wasmtime::component::Func,495r2: wasmtime::component::Func,496r3: wasmtime::component::Func,497r4: wasmtime::component::Func,498r5: wasmtime::component::Func,499r6: wasmtime::component::Func,500r7: wasmtime::component::Func,501r8: wasmtime::component::Func,502pair_ret: wasmtime::component::Func,503}504#[derive(Clone)]505pub struct GuestIndices {506a1: wasmtime::component::ComponentExportIndex,507a2: wasmtime::component::ComponentExportIndex,508a3: wasmtime::component::ComponentExportIndex,509a4: wasmtime::component::ComponentExportIndex,510a5: wasmtime::component::ComponentExportIndex,511a6: wasmtime::component::ComponentExportIndex,512a7: wasmtime::component::ComponentExportIndex,513a8: wasmtime::component::ComponentExportIndex,514a9: wasmtime::component::ComponentExportIndex,515r1: wasmtime::component::ComponentExportIndex,516r2: wasmtime::component::ComponentExportIndex,517r3: wasmtime::component::ComponentExportIndex,518r4: wasmtime::component::ComponentExportIndex,519r5: wasmtime::component::ComponentExportIndex,520r6: wasmtime::component::ComponentExportIndex,521r7: wasmtime::component::ComponentExportIndex,522r8: wasmtime::component::ComponentExportIndex,523pair_ret: wasmtime::component::ComponentExportIndex,524}525impl GuestIndices {526/// Constructor for [`GuestIndices`] which takes a527/// [`Component`](wasmtime::component::Component) as input and can be executed528/// before instantiation.529///530/// This constructor can be used to front-load string lookups to find exports531/// within a component.532pub fn new<_T>(533_instance_pre: &wasmtime::component::InstancePre<_T>,534) -> wasmtime::Result<GuestIndices> {535let instance = _instance_pre536.component()537.get_export_index(None, "foo:foo/integers")538.ok_or_else(|| {539anyhow::anyhow!(540"no exported instance named `foo:foo/integers`"541)542})?;543let mut lookup = move |name| {544_instance_pre545.component()546.get_export_index(Some(&instance), name)547.ok_or_else(|| {548anyhow::anyhow!(549"instance export `foo:foo/integers` does \550not have export `{name}`"551)552})553};554let _ = &mut lookup;555let a1 = lookup("a1")?;556let a2 = lookup("a2")?;557let a3 = lookup("a3")?;558let a4 = lookup("a4")?;559let a5 = lookup("a5")?;560let a6 = lookup("a6")?;561let a7 = lookup("a7")?;562let a8 = lookup("a8")?;563let a9 = lookup("a9")?;564let r1 = lookup("r1")?;565let r2 = lookup("r2")?;566let r3 = lookup("r3")?;567let r4 = lookup("r4")?;568let r5 = lookup("r5")?;569let r6 = lookup("r6")?;570let r7 = lookup("r7")?;571let r8 = lookup("r8")?;572let pair_ret = lookup("pair-ret")?;573Ok(GuestIndices {574a1,575a2,576a3,577a4,578a5,579a6,580a7,581a8,582a9,583r1,584r2,585r3,586r4,587r5,588r6,589r7,590r8,591pair_ret,592})593}594pub fn load(595&self,596mut store: impl wasmtime::AsContextMut,597instance: &wasmtime::component::Instance,598) -> wasmtime::Result<Guest> {599let _instance = instance;600let _instance_pre = _instance.instance_pre(&store);601let _instance_type = _instance_pre.instance_type();602let mut store = store.as_context_mut();603let _ = &mut store;604let a1 = *_instance605.get_typed_func::<(u8,), ()>(&mut store, &self.a1)?606.func();607let a2 = *_instance608.get_typed_func::<(i8,), ()>(&mut store, &self.a2)?609.func();610let a3 = *_instance611.get_typed_func::<(u16,), ()>(&mut store, &self.a3)?612.func();613let a4 = *_instance614.get_typed_func::<(i16,), ()>(&mut store, &self.a4)?615.func();616let a5 = *_instance617.get_typed_func::<(u32,), ()>(&mut store, &self.a5)?618.func();619let a6 = *_instance620.get_typed_func::<(i32,), ()>(&mut store, &self.a6)?621.func();622let a7 = *_instance623.get_typed_func::<(u64,), ()>(&mut store, &self.a7)?624.func();625let a8 = *_instance626.get_typed_func::<(i64,), ()>(&mut store, &self.a8)?627.func();628let a9 = *_instance629.get_typed_func::<630(u8, i8, u16, i16, u32, i32, u64, i64),631(),632>(&mut store, &self.a9)?633.func();634let r1 = *_instance635.get_typed_func::<(), (u8,)>(&mut store, &self.r1)?636.func();637let r2 = *_instance638.get_typed_func::<(), (i8,)>(&mut store, &self.r2)?639.func();640let r3 = *_instance641.get_typed_func::<(), (u16,)>(&mut store, &self.r3)?642.func();643let r4 = *_instance644.get_typed_func::<(), (i16,)>(&mut store, &self.r4)?645.func();646let r5 = *_instance647.get_typed_func::<(), (u32,)>(&mut store, &self.r5)?648.func();649let r6 = *_instance650.get_typed_func::<(), (i32,)>(&mut store, &self.r6)?651.func();652let r7 = *_instance653.get_typed_func::<(), (u64,)>(&mut store, &self.r7)?654.func();655let r8 = *_instance656.get_typed_func::<(), (i64,)>(&mut store, &self.r8)?657.func();658let pair_ret = *_instance659.get_typed_func::<660(),661((i64, u8),),662>(&mut store, &self.pair_ret)?663.func();664Ok(Guest {665a1,666a2,667a3,668a4,669a5,670a6,671a7,672a8,673a9,674r1,675r2,676r3,677r4,678r5,679r6,680r7,681r8,682pair_ret,683})684}685}686impl Guest {687pub fn call_a1<S: wasmtime::AsContextMut>(688&self,689mut store: S,690arg0: u8,691) -> wasmtime::Result<()> {692let callee = unsafe {693wasmtime::component::TypedFunc::<694(u8,),695(),696>::new_unchecked(self.a1)697};698let () = callee.call(store.as_context_mut(), (arg0,))?;699callee.post_return(store.as_context_mut())?;700Ok(())701}702pub fn call_a2<S: wasmtime::AsContextMut>(703&self,704mut store: S,705arg0: i8,706) -> wasmtime::Result<()> {707let callee = unsafe {708wasmtime::component::TypedFunc::<709(i8,),710(),711>::new_unchecked(self.a2)712};713let () = callee.call(store.as_context_mut(), (arg0,))?;714callee.post_return(store.as_context_mut())?;715Ok(())716}717pub fn call_a3<S: wasmtime::AsContextMut>(718&self,719mut store: S,720arg0: u16,721) -> wasmtime::Result<()> {722let callee = unsafe {723wasmtime::component::TypedFunc::<724(u16,),725(),726>::new_unchecked(self.a3)727};728let () = callee.call(store.as_context_mut(), (arg0,))?;729callee.post_return(store.as_context_mut())?;730Ok(())731}732pub fn call_a4<S: wasmtime::AsContextMut>(733&self,734mut store: S,735arg0: i16,736) -> wasmtime::Result<()> {737let callee = unsafe {738wasmtime::component::TypedFunc::<739(i16,),740(),741>::new_unchecked(self.a4)742};743let () = callee.call(store.as_context_mut(), (arg0,))?;744callee.post_return(store.as_context_mut())?;745Ok(())746}747pub fn call_a5<S: wasmtime::AsContextMut>(748&self,749mut store: S,750arg0: u32,751) -> wasmtime::Result<()> {752let callee = unsafe {753wasmtime::component::TypedFunc::<754(u32,),755(),756>::new_unchecked(self.a5)757};758let () = callee.call(store.as_context_mut(), (arg0,))?;759callee.post_return(store.as_context_mut())?;760Ok(())761}762pub fn call_a6<S: wasmtime::AsContextMut>(763&self,764mut store: S,765arg0: i32,766) -> wasmtime::Result<()> {767let callee = unsafe {768wasmtime::component::TypedFunc::<769(i32,),770(),771>::new_unchecked(self.a6)772};773let () = callee.call(store.as_context_mut(), (arg0,))?;774callee.post_return(store.as_context_mut())?;775Ok(())776}777pub fn call_a7<S: wasmtime::AsContextMut>(778&self,779mut store: S,780arg0: u64,781) -> wasmtime::Result<()> {782let callee = unsafe {783wasmtime::component::TypedFunc::<784(u64,),785(),786>::new_unchecked(self.a7)787};788let () = callee.call(store.as_context_mut(), (arg0,))?;789callee.post_return(store.as_context_mut())?;790Ok(())791}792pub fn call_a8<S: wasmtime::AsContextMut>(793&self,794mut store: S,795arg0: i64,796) -> wasmtime::Result<()> {797let callee = unsafe {798wasmtime::component::TypedFunc::<799(i64,),800(),801>::new_unchecked(self.a8)802};803let () = callee.call(store.as_context_mut(), (arg0,))?;804callee.post_return(store.as_context_mut())?;805Ok(())806}807pub fn call_a9<S: wasmtime::AsContextMut>(808&self,809mut store: S,810arg0: u8,811arg1: i8,812arg2: u16,813arg3: i16,814arg4: u32,815arg5: i32,816arg6: u64,817arg7: i64,818) -> wasmtime::Result<()> {819let callee = unsafe {820wasmtime::component::TypedFunc::<821(u8, i8, u16, i16, u32, i32, u64, i64),822(),823>::new_unchecked(self.a9)824};825let () = callee826.call(827store.as_context_mut(),828(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7),829)?;830callee.post_return(store.as_context_mut())?;831Ok(())832}833pub fn call_r1<S: wasmtime::AsContextMut>(834&self,835mut store: S,836) -> wasmtime::Result<u8> {837let callee = unsafe {838wasmtime::component::TypedFunc::<839(),840(u8,),841>::new_unchecked(self.r1)842};843let (ret0,) = callee.call(store.as_context_mut(), ())?;844callee.post_return(store.as_context_mut())?;845Ok(ret0)846}847pub fn call_r2<S: wasmtime::AsContextMut>(848&self,849mut store: S,850) -> wasmtime::Result<i8> {851let callee = unsafe {852wasmtime::component::TypedFunc::<853(),854(i8,),855>::new_unchecked(self.r2)856};857let (ret0,) = callee.call(store.as_context_mut(), ())?;858callee.post_return(store.as_context_mut())?;859Ok(ret0)860}861pub fn call_r3<S: wasmtime::AsContextMut>(862&self,863mut store: S,864) -> wasmtime::Result<u16> {865let callee = unsafe {866wasmtime::component::TypedFunc::<867(),868(u16,),869>::new_unchecked(self.r3)870};871let (ret0,) = callee.call(store.as_context_mut(), ())?;872callee.post_return(store.as_context_mut())?;873Ok(ret0)874}875pub fn call_r4<S: wasmtime::AsContextMut>(876&self,877mut store: S,878) -> wasmtime::Result<i16> {879let callee = unsafe {880wasmtime::component::TypedFunc::<881(),882(i16,),883>::new_unchecked(self.r4)884};885let (ret0,) = callee.call(store.as_context_mut(), ())?;886callee.post_return(store.as_context_mut())?;887Ok(ret0)888}889pub fn call_r5<S: wasmtime::AsContextMut>(890&self,891mut store: S,892) -> wasmtime::Result<u32> {893let callee = unsafe {894wasmtime::component::TypedFunc::<895(),896(u32,),897>::new_unchecked(self.r5)898};899let (ret0,) = callee.call(store.as_context_mut(), ())?;900callee.post_return(store.as_context_mut())?;901Ok(ret0)902}903pub fn call_r6<S: wasmtime::AsContextMut>(904&self,905mut store: S,906) -> wasmtime::Result<i32> {907let callee = unsafe {908wasmtime::component::TypedFunc::<909(),910(i32,),911>::new_unchecked(self.r6)912};913let (ret0,) = callee.call(store.as_context_mut(), ())?;914callee.post_return(store.as_context_mut())?;915Ok(ret0)916}917pub fn call_r7<S: wasmtime::AsContextMut>(918&self,919mut store: S,920) -> wasmtime::Result<u64> {921let callee = unsafe {922wasmtime::component::TypedFunc::<923(),924(u64,),925>::new_unchecked(self.r7)926};927let (ret0,) = callee.call(store.as_context_mut(), ())?;928callee.post_return(store.as_context_mut())?;929Ok(ret0)930}931pub fn call_r8<S: wasmtime::AsContextMut>(932&self,933mut store: S,934) -> wasmtime::Result<i64> {935let callee = unsafe {936wasmtime::component::TypedFunc::<937(),938(i64,),939>::new_unchecked(self.r8)940};941let (ret0,) = callee.call(store.as_context_mut(), ())?;942callee.post_return(store.as_context_mut())?;943Ok(ret0)944}945pub fn call_pair_ret<S: wasmtime::AsContextMut>(946&self,947mut store: S,948) -> wasmtime::Result<(i64, u8)> {949let callee = unsafe {950wasmtime::component::TypedFunc::<951(),952((i64, u8),),953>::new_unchecked(self.pair_ret)954};955let (ret0,) = callee.call(store.as_context_mut(), ())?;956callee.post_return(store.as_context_mut())?;957Ok(ret0)958}959}960}961}962}963}964965966