Path: blob/main/crates/component-macro/tests/expanded/integers.rs
3050 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,176for<'a> D::Data<'a>: foo::foo::integers::Host,177T: 'static,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 {}194impl<_T: ?Sized> HostWithStore for _T195where196_T: wasmtime::component::HasData,197{}198pub trait Host {199fn a1(&mut self, x: u8) -> ();200fn a2(&mut self, x: i8) -> ();201fn a3(&mut self, x: u16) -> ();202fn a4(&mut self, x: i16) -> ();203fn a5(&mut self, x: u32) -> ();204fn a6(&mut self, x: i32) -> ();205fn a7(&mut self, x: u64) -> ();206fn a8(&mut self, x: i64) -> ();207fn a9(208&mut self,209p1: u8,210p2: i8,211p3: u16,212p4: i16,213p5: u32,214p6: i32,215p7: u64,216p8: i64,217) -> ();218fn r1(&mut self) -> u8;219fn r2(&mut self) -> i8;220fn r3(&mut self) -> u16;221fn r4(&mut self) -> i16;222fn r5(&mut self) -> u32;223fn r6(&mut self) -> i32;224fn r7(&mut self) -> u64;225fn r8(&mut self) -> i64;226fn pair_ret(&mut self) -> (i64, u8);227}228impl<_T: Host + ?Sized> Host for &mut _T {229fn a1(&mut self, x: u8) -> () {230Host::a1(*self, x)231}232fn a2(&mut self, x: i8) -> () {233Host::a2(*self, x)234}235fn a3(&mut self, x: u16) -> () {236Host::a3(*self, x)237}238fn a4(&mut self, x: i16) -> () {239Host::a4(*self, x)240}241fn a5(&mut self, x: u32) -> () {242Host::a5(*self, x)243}244fn a6(&mut self, x: i32) -> () {245Host::a6(*self, x)246}247fn a7(&mut self, x: u64) -> () {248Host::a7(*self, x)249}250fn a8(&mut self, x: i64) -> () {251Host::a8(*self, x)252}253fn a9(254&mut self,255p1: u8,256p2: i8,257p3: u16,258p4: i16,259p5: u32,260p6: i32,261p7: u64,262p8: i64,263) -> () {264Host::a9(*self, p1, p2, p3, p4, p5, p6, p7, p8)265}266fn r1(&mut self) -> u8 {267Host::r1(*self)268}269fn r2(&mut self) -> i8 {270Host::r2(*self)271}272fn r3(&mut self) -> u16 {273Host::r3(*self)274}275fn r4(&mut self) -> i16 {276Host::r4(*self)277}278fn r5(&mut self) -> u32 {279Host::r5(*self)280}281fn r6(&mut self) -> i32 {282Host::r6(*self)283}284fn r7(&mut self) -> u64 {285Host::r7(*self)286}287fn r8(&mut self) -> i64 {288Host::r8(*self)289}290fn pair_ret(&mut self) -> (i64, u8) {291Host::pair_ret(*self)292}293}294pub fn add_to_linker<T, D>(295linker: &mut wasmtime::component::Linker<T>,296host_getter: fn(&mut T) -> D::Data<'_>,297) -> wasmtime::Result<()>298where299D: HostWithStore,300for<'a> D::Data<'a>: Host,301T: 'static,302{303let mut inst = linker.instance("foo:foo/integers")?;304inst.func_wrap(305"a1",306move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u8,)| {307let host = &mut host_getter(caller.data_mut());308let r = Host::a1(host, arg0);309Ok(r)310},311)?;312inst.func_wrap(313"a2",314move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i8,)| {315let host = &mut host_getter(caller.data_mut());316let r = Host::a2(host, arg0);317Ok(r)318},319)?;320inst.func_wrap(321"a3",322move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u16,)| {323let host = &mut host_getter(caller.data_mut());324let r = Host::a3(host, arg0);325Ok(r)326},327)?;328inst.func_wrap(329"a4",330move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i16,)| {331let host = &mut host_getter(caller.data_mut());332let r = Host::a4(host, arg0);333Ok(r)334},335)?;336inst.func_wrap(337"a5",338move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u32,)| {339let host = &mut host_getter(caller.data_mut());340let r = Host::a5(host, arg0);341Ok(r)342},343)?;344inst.func_wrap(345"a6",346move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i32,)| {347let host = &mut host_getter(caller.data_mut());348let r = Host::a6(host, arg0);349Ok(r)350},351)?;352inst.func_wrap(353"a7",354move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (u64,)| {355let host = &mut host_getter(caller.data_mut());356let r = Host::a7(host, arg0);357Ok(r)358},359)?;360inst.func_wrap(361"a8",362move |mut caller: wasmtime::StoreContextMut<'_, T>, (arg0,): (i64,)| {363let host = &mut host_getter(caller.data_mut());364let r = Host::a8(host, arg0);365Ok(r)366},367)?;368inst.func_wrap(369"a9",370move |371mut caller: wasmtime::StoreContextMut<'_, T>,372(373arg0,374arg1,375arg2,376arg3,377arg4,378arg5,379arg6,380arg7,381): (u8, i8, u16, i16, u32, i32, u64, i64)|382{383let host = &mut host_getter(caller.data_mut());384let r = Host::a9(385host,386arg0,387arg1,388arg2,389arg3,390arg4,391arg5,392arg6,393arg7,394);395Ok(r)396},397)?;398inst.func_wrap(399"r1",400move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {401let host = &mut host_getter(caller.data_mut());402let r = Host::r1(host);403Ok((r,))404},405)?;406inst.func_wrap(407"r2",408move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {409let host = &mut host_getter(caller.data_mut());410let r = Host::r2(host);411Ok((r,))412},413)?;414inst.func_wrap(415"r3",416move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {417let host = &mut host_getter(caller.data_mut());418let r = Host::r3(host);419Ok((r,))420},421)?;422inst.func_wrap(423"r4",424move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {425let host = &mut host_getter(caller.data_mut());426let r = Host::r4(host);427Ok((r,))428},429)?;430inst.func_wrap(431"r5",432move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {433let host = &mut host_getter(caller.data_mut());434let r = Host::r5(host);435Ok((r,))436},437)?;438inst.func_wrap(439"r6",440move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {441let host = &mut host_getter(caller.data_mut());442let r = Host::r6(host);443Ok((r,))444},445)?;446inst.func_wrap(447"r7",448move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {449let host = &mut host_getter(caller.data_mut());450let r = Host::r7(host);451Ok((r,))452},453)?;454inst.func_wrap(455"r8",456move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {457let host = &mut host_getter(caller.data_mut());458let r = Host::r8(host);459Ok((r,))460},461)?;462inst.func_wrap(463"pair-ret",464move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {465let host = &mut host_getter(caller.data_mut());466let r = Host::pair_ret(host);467Ok((r,))468},469)?;470Ok(())471}472}473}474}475pub mod exports {476pub mod foo {477pub mod foo {478#[allow(clippy::all)]479pub mod integers {480#[allow(unused_imports)]481use wasmtime::component::__internal::Box;482#[derive(Clone)]483pub struct Guest {484a1: wasmtime::component::Func,485a2: wasmtime::component::Func,486a3: wasmtime::component::Func,487a4: wasmtime::component::Func,488a5: wasmtime::component::Func,489a6: wasmtime::component::Func,490a7: wasmtime::component::Func,491a8: wasmtime::component::Func,492a9: wasmtime::component::Func,493r1: wasmtime::component::Func,494r2: wasmtime::component::Func,495r3: wasmtime::component::Func,496r4: wasmtime::component::Func,497r5: wasmtime::component::Func,498r6: wasmtime::component::Func,499r7: wasmtime::component::Func,500r8: wasmtime::component::Func,501pair_ret: wasmtime::component::Func,502}503#[derive(Clone)]504pub struct GuestIndices {505a1: wasmtime::component::ComponentExportIndex,506a2: wasmtime::component::ComponentExportIndex,507a3: wasmtime::component::ComponentExportIndex,508a4: wasmtime::component::ComponentExportIndex,509a5: wasmtime::component::ComponentExportIndex,510a6: wasmtime::component::ComponentExportIndex,511a7: wasmtime::component::ComponentExportIndex,512a8: wasmtime::component::ComponentExportIndex,513a9: wasmtime::component::ComponentExportIndex,514r1: wasmtime::component::ComponentExportIndex,515r2: wasmtime::component::ComponentExportIndex,516r3: wasmtime::component::ComponentExportIndex,517r4: wasmtime::component::ComponentExportIndex,518r5: wasmtime::component::ComponentExportIndex,519r6: wasmtime::component::ComponentExportIndex,520r7: wasmtime::component::ComponentExportIndex,521r8: wasmtime::component::ComponentExportIndex,522pair_ret: wasmtime::component::ComponentExportIndex,523}524impl GuestIndices {525/// Constructor for [`GuestIndices`] which takes a526/// [`Component`](wasmtime::component::Component) as input and can be executed527/// before instantiation.528///529/// This constructor can be used to front-load string lookups to find exports530/// within a component.531pub fn new<_T>(532_instance_pre: &wasmtime::component::InstancePre<_T>,533) -> wasmtime::Result<GuestIndices> {534let instance = _instance_pre535.component()536.get_export_index(None, "foo:foo/integers")537.ok_or_else(|| {538wasmtime::format_err!(539"no exported instance named `foo:foo/integers`"540)541})?;542let mut lookup = move |name| {543_instance_pre544.component()545.get_export_index(Some(&instance), name)546.ok_or_else(|| {547wasmtime::format_err!(548"instance export `foo:foo/integers` does \549not have export `{name}`"550)551})552};553let _ = &mut lookup;554let a1 = lookup("a1")?;555let a2 = lookup("a2")?;556let a3 = lookup("a3")?;557let a4 = lookup("a4")?;558let a5 = lookup("a5")?;559let a6 = lookup("a6")?;560let a7 = lookup("a7")?;561let a8 = lookup("a8")?;562let a9 = lookup("a9")?;563let r1 = lookup("r1")?;564let r2 = lookup("r2")?;565let r3 = lookup("r3")?;566let r4 = lookup("r4")?;567let r5 = lookup("r5")?;568let r6 = lookup("r6")?;569let r7 = lookup("r7")?;570let r8 = lookup("r8")?;571let pair_ret = lookup("pair-ret")?;572Ok(GuestIndices {573a1,574a2,575a3,576a4,577a5,578a6,579a7,580a8,581a9,582r1,583r2,584r3,585r4,586r5,587r6,588r7,589r8,590pair_ret,591})592}593pub fn load(594&self,595mut store: impl wasmtime::AsContextMut,596instance: &wasmtime::component::Instance,597) -> wasmtime::Result<Guest> {598let _instance = instance;599let _instance_pre = _instance.instance_pre(&store);600let _instance_type = _instance_pre.instance_type();601let mut store = store.as_context_mut();602let _ = &mut store;603let a1 = *_instance604.get_typed_func::<(u8,), ()>(&mut store, &self.a1)?605.func();606let a2 = *_instance607.get_typed_func::<(i8,), ()>(&mut store, &self.a2)?608.func();609let a3 = *_instance610.get_typed_func::<(u16,), ()>(&mut store, &self.a3)?611.func();612let a4 = *_instance613.get_typed_func::<(i16,), ()>(&mut store, &self.a4)?614.func();615let a5 = *_instance616.get_typed_func::<(u32,), ()>(&mut store, &self.a5)?617.func();618let a6 = *_instance619.get_typed_func::<(i32,), ()>(&mut store, &self.a6)?620.func();621let a7 = *_instance622.get_typed_func::<(u64,), ()>(&mut store, &self.a7)?623.func();624let a8 = *_instance625.get_typed_func::<(i64,), ()>(&mut store, &self.a8)?626.func();627let a9 = *_instance628.get_typed_func::<629(u8, i8, u16, i16, u32, i32, u64, i64),630(),631>(&mut store, &self.a9)?632.func();633let r1 = *_instance634.get_typed_func::<(), (u8,)>(&mut store, &self.r1)?635.func();636let r2 = *_instance637.get_typed_func::<(), (i8,)>(&mut store, &self.r2)?638.func();639let r3 = *_instance640.get_typed_func::<(), (u16,)>(&mut store, &self.r3)?641.func();642let r4 = *_instance643.get_typed_func::<(), (i16,)>(&mut store, &self.r4)?644.func();645let r5 = *_instance646.get_typed_func::<(), (u32,)>(&mut store, &self.r5)?647.func();648let r6 = *_instance649.get_typed_func::<(), (i32,)>(&mut store, &self.r6)?650.func();651let r7 = *_instance652.get_typed_func::<(), (u64,)>(&mut store, &self.r7)?653.func();654let r8 = *_instance655.get_typed_func::<(), (i64,)>(&mut store, &self.r8)?656.func();657let pair_ret = *_instance658.get_typed_func::<659(),660((i64, u8),),661>(&mut store, &self.pair_ret)?662.func();663Ok(Guest {664a1,665a2,666a3,667a4,668a5,669a6,670a7,671a8,672a9,673r1,674r2,675r3,676r4,677r5,678r6,679r7,680r8,681pair_ret,682})683}684}685impl Guest {686pub fn call_a1<S: wasmtime::AsContextMut>(687&self,688mut store: S,689arg0: u8,690) -> wasmtime::Result<()> {691let callee = unsafe {692wasmtime::component::TypedFunc::<693(u8,),694(),695>::new_unchecked(self.a1)696};697let () = callee.call(store.as_context_mut(), (arg0,))?;698Ok(())699}700pub fn call_a2<S: wasmtime::AsContextMut>(701&self,702mut store: S,703arg0: i8,704) -> wasmtime::Result<()> {705let callee = unsafe {706wasmtime::component::TypedFunc::<707(i8,),708(),709>::new_unchecked(self.a2)710};711let () = callee.call(store.as_context_mut(), (arg0,))?;712Ok(())713}714pub fn call_a3<S: wasmtime::AsContextMut>(715&self,716mut store: S,717arg0: u16,718) -> wasmtime::Result<()> {719let callee = unsafe {720wasmtime::component::TypedFunc::<721(u16,),722(),723>::new_unchecked(self.a3)724};725let () = callee.call(store.as_context_mut(), (arg0,))?;726Ok(())727}728pub fn call_a4<S: wasmtime::AsContextMut>(729&self,730mut store: S,731arg0: i16,732) -> wasmtime::Result<()> {733let callee = unsafe {734wasmtime::component::TypedFunc::<735(i16,),736(),737>::new_unchecked(self.a4)738};739let () = callee.call(store.as_context_mut(), (arg0,))?;740Ok(())741}742pub fn call_a5<S: wasmtime::AsContextMut>(743&self,744mut store: S,745arg0: u32,746) -> wasmtime::Result<()> {747let callee = unsafe {748wasmtime::component::TypedFunc::<749(u32,),750(),751>::new_unchecked(self.a5)752};753let () = callee.call(store.as_context_mut(), (arg0,))?;754Ok(())755}756pub fn call_a6<S: wasmtime::AsContextMut>(757&self,758mut store: S,759arg0: i32,760) -> wasmtime::Result<()> {761let callee = unsafe {762wasmtime::component::TypedFunc::<763(i32,),764(),765>::new_unchecked(self.a6)766};767let () = callee.call(store.as_context_mut(), (arg0,))?;768Ok(())769}770pub fn call_a7<S: wasmtime::AsContextMut>(771&self,772mut store: S,773arg0: u64,774) -> wasmtime::Result<()> {775let callee = unsafe {776wasmtime::component::TypedFunc::<777(u64,),778(),779>::new_unchecked(self.a7)780};781let () = callee.call(store.as_context_mut(), (arg0,))?;782Ok(())783}784pub fn call_a8<S: wasmtime::AsContextMut>(785&self,786mut store: S,787arg0: i64,788) -> wasmtime::Result<()> {789let callee = unsafe {790wasmtime::component::TypedFunc::<791(i64,),792(),793>::new_unchecked(self.a8)794};795let () = callee.call(store.as_context_mut(), (arg0,))?;796Ok(())797}798pub fn call_a9<S: wasmtime::AsContextMut>(799&self,800mut store: S,801arg0: u8,802arg1: i8,803arg2: u16,804arg3: i16,805arg4: u32,806arg5: i32,807arg6: u64,808arg7: i64,809) -> wasmtime::Result<()> {810let callee = unsafe {811wasmtime::component::TypedFunc::<812(u8, i8, u16, i16, u32, i32, u64, i64),813(),814>::new_unchecked(self.a9)815};816let () = callee817.call(818store.as_context_mut(),819(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7),820)?;821Ok(())822}823pub fn call_r1<S: wasmtime::AsContextMut>(824&self,825mut store: S,826) -> wasmtime::Result<u8> {827let callee = unsafe {828wasmtime::component::TypedFunc::<829(),830(u8,),831>::new_unchecked(self.r1)832};833let (ret0,) = callee.call(store.as_context_mut(), ())?;834Ok(ret0)835}836pub fn call_r2<S: wasmtime::AsContextMut>(837&self,838mut store: S,839) -> wasmtime::Result<i8> {840let callee = unsafe {841wasmtime::component::TypedFunc::<842(),843(i8,),844>::new_unchecked(self.r2)845};846let (ret0,) = callee.call(store.as_context_mut(), ())?;847Ok(ret0)848}849pub fn call_r3<S: wasmtime::AsContextMut>(850&self,851mut store: S,852) -> wasmtime::Result<u16> {853let callee = unsafe {854wasmtime::component::TypedFunc::<855(),856(u16,),857>::new_unchecked(self.r3)858};859let (ret0,) = callee.call(store.as_context_mut(), ())?;860Ok(ret0)861}862pub fn call_r4<S: wasmtime::AsContextMut>(863&self,864mut store: S,865) -> wasmtime::Result<i16> {866let callee = unsafe {867wasmtime::component::TypedFunc::<868(),869(i16,),870>::new_unchecked(self.r4)871};872let (ret0,) = callee.call(store.as_context_mut(), ())?;873Ok(ret0)874}875pub fn call_r5<S: wasmtime::AsContextMut>(876&self,877mut store: S,878) -> wasmtime::Result<u32> {879let callee = unsafe {880wasmtime::component::TypedFunc::<881(),882(u32,),883>::new_unchecked(self.r5)884};885let (ret0,) = callee.call(store.as_context_mut(), ())?;886Ok(ret0)887}888pub fn call_r6<S: wasmtime::AsContextMut>(889&self,890mut store: S,891) -> wasmtime::Result<i32> {892let callee = unsafe {893wasmtime::component::TypedFunc::<894(),895(i32,),896>::new_unchecked(self.r6)897};898let (ret0,) = callee.call(store.as_context_mut(), ())?;899Ok(ret0)900}901pub fn call_r7<S: wasmtime::AsContextMut>(902&self,903mut store: S,904) -> wasmtime::Result<u64> {905let callee = unsafe {906wasmtime::component::TypedFunc::<907(),908(u64,),909>::new_unchecked(self.r7)910};911let (ret0,) = callee.call(store.as_context_mut(), ())?;912Ok(ret0)913}914pub fn call_r8<S: wasmtime::AsContextMut>(915&self,916mut store: S,917) -> wasmtime::Result<i64> {918let callee = unsafe {919wasmtime::component::TypedFunc::<920(),921(i64,),922>::new_unchecked(self.r8)923};924let (ret0,) = callee.call(store.as_context_mut(), ())?;925Ok(ret0)926}927pub fn call_pair_ret<S: wasmtime::AsContextMut>(928&self,929mut store: S,930) -> wasmtime::Result<(i64, u8)> {931let callee = unsafe {932wasmtime::component::TypedFunc::<933(),934((i64, u8),),935>::new_unchecked(self.pair_ret)936};937let (ret0,) = callee.call(store.as_context_mut(), ())?;938Ok(ret0)939}940}941}942}943}944}945946947