Path: blob/main/crates/component-macro/tests/expanded/lists_concurrent.rs
1692 views
/// Auto-generated bindings for a pre-instantiated version of a1/// component which implements the world `the-lists`.2///3/// This structure is created through [`TheListsPre::new`] which4/// takes a [`InstancePre`](wasmtime::component::InstancePre) that5/// has been created through a [`Linker`](wasmtime::component::Linker).6///7/// For more information see [`TheLists`] as well.8pub struct TheListsPre<T: 'static> {9instance_pre: wasmtime::component::InstancePre<T>,10indices: TheListsIndices,11}12impl<T: 'static> Clone for TheListsPre<T> {13fn clone(&self) -> Self {14Self {15instance_pre: self.instance_pre.clone(),16indices: self.indices.clone(),17}18}19}20impl<_T: 'static> TheListsPre<_T> {21/// Creates a new copy of `TheListsPre` 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 = TheListsIndices::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 [`TheLists`] 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<TheLists> {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> TheListsPre<_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<TheLists> {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-lists`.67///68/// This is an implementation detail of [`TheListsPre`] and can69/// be constructed if needed as well.70///71/// For more information see [`TheLists`] as well.72#[derive(Clone)]73pub struct TheListsIndices {74interface0: exports::foo::foo::lists::GuestIndices,75}76/// Auto-generated bindings for an instance a component which77/// implements the world `the-lists`.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/// [`TheLists::instantiate`] which only needs a84/// [`Store`], [`Component`], and [`Linker`].85///86/// * Alternatively you can create a [`TheListsPre`] ahead of87/// time with a [`Component`] to front-load string lookups88/// of exports once instead of per-instantiation. This89/// method then uses [`TheListsPre::instantiate`] to90/// create a [`TheLists`].91///92/// * If you've instantiated the instance yourself already93/// then you can use [`TheLists::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 TheLists {102interface0: exports::foo::foo::lists::Guest,103}104const _: () = {105#[allow(unused_imports)]106use wasmtime::component::__internal::anyhow;107impl TheListsIndices {108/// Creates a new copy of `TheListsIndices` 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::lists::GuestIndices::new(_instance_pre)?;119Ok(TheListsIndices { interface0 })120}121/// Uses the indices stored in `self` to load an instance122/// of [`TheLists`] 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<TheLists> {131let _ = &mut store;132let _instance = instance;133let interface0 = self.interface0.load(&mut store, &_instance)?;134Ok(TheLists { interface0 })135}136}137impl TheLists {138/// Convenience wrapper around [`TheListsPre::new`] and139/// [`TheListsPre::instantiate`].140pub fn instantiate<_T>(141store: impl wasmtime::AsContextMut<Data = _T>,142component: &wasmtime::component::Component,143linker: &wasmtime::component::Linker<_T>,144) -> wasmtime::Result<TheLists> {145let pre = linker.instantiate_pre(component)?;146TheListsPre::new(pre)?.instantiate(store)147}148/// Convenience wrapper around [`TheListsIndices::new`] and149/// [`TheListsIndices::load`].150pub fn new(151mut store: impl wasmtime::AsContextMut,152instance: &wasmtime::component::Instance,153) -> wasmtime::Result<TheLists> {154let indices = TheListsIndices::new(&instance.instance_pre(&store))?;155indices.load(&mut store, instance)156}157/// Convenience wrapper around [`TheListsPre::new`] and158/// [`TheListsPre::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<TheLists>164where165_T: Send,166{167let pre = linker.instantiate_pre(component)?;168TheListsPre::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::lists::HostWithStore + Send,176for<'a> D::Data<'a>: foo::foo::lists::Host + Send,177T: 'static + Send,178{179foo::foo::lists::add_to_linker::<T, D>(linker, host_getter)?;180Ok(())181}182pub fn foo_foo_lists(&self) -> &exports::foo::foo::lists::Guest {183&self.interface0184}185}186};187pub mod foo {188pub mod foo {189#[allow(clippy::all)]190pub mod lists {191#[allow(unused_imports)]192use wasmtime::component::__internal::{anyhow, Box};193#[derive(wasmtime::component::ComponentType)]194#[derive(wasmtime::component::Lift)]195#[derive(wasmtime::component::Lower)]196#[component(record)]197#[derive(Clone)]198pub struct OtherRecord {199#[component(name = "a1")]200pub a1: u32,201#[component(name = "a2")]202pub a2: u64,203#[component(name = "a3")]204pub a3: i32,205#[component(name = "a4")]206pub a4: i64,207#[component(name = "b")]208pub b: wasmtime::component::__internal::String,209#[component(name = "c")]210pub c: wasmtime::component::__internal::Vec<u8>,211}212impl core::fmt::Debug for OtherRecord {213fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {214f.debug_struct("OtherRecord")215.field("a1", &self.a1)216.field("a2", &self.a2)217.field("a3", &self.a3)218.field("a4", &self.a4)219.field("b", &self.b)220.field("c", &self.c)221.finish()222}223}224const _: () = {225assert!(22648 == < OtherRecord as wasmtime::component::ComponentType >::SIZE32227);228assert!(2298 == < OtherRecord as wasmtime::component::ComponentType >::ALIGN32230);231};232#[derive(wasmtime::component::ComponentType)]233#[derive(wasmtime::component::Lift)]234#[derive(wasmtime::component::Lower)]235#[component(record)]236#[derive(Clone)]237pub struct SomeRecord {238#[component(name = "x")]239pub x: wasmtime::component::__internal::String,240#[component(name = "y")]241pub y: OtherRecord,242#[component(name = "z")]243pub z: wasmtime::component::__internal::Vec<OtherRecord>,244#[component(name = "c1")]245pub c1: u32,246#[component(name = "c2")]247pub c2: u64,248#[component(name = "c3")]249pub c3: i32,250#[component(name = "c4")]251pub c4: i64,252}253impl core::fmt::Debug for SomeRecord {254fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {255f.debug_struct("SomeRecord")256.field("x", &self.x)257.field("y", &self.y)258.field("z", &self.z)259.field("c1", &self.c1)260.field("c2", &self.c2)261.field("c3", &self.c3)262.field("c4", &self.c4)263.finish()264}265}266const _: () = {267assert!(26896 == < SomeRecord as wasmtime::component::ComponentType >::SIZE32269);270assert!(2718 == < SomeRecord as wasmtime::component::ComponentType >::ALIGN32272);273};274#[derive(wasmtime::component::ComponentType)]275#[derive(wasmtime::component::Lift)]276#[derive(wasmtime::component::Lower)]277#[component(variant)]278#[derive(Clone)]279pub enum OtherVariant {280#[component(name = "a")]281A,282#[component(name = "b")]283B(u32),284#[component(name = "c")]285C(wasmtime::component::__internal::String),286}287impl core::fmt::Debug for OtherVariant {288fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {289match self {290OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),291OtherVariant::B(e) => {292f.debug_tuple("OtherVariant::B").field(e).finish()293}294OtherVariant::C(e) => {295f.debug_tuple("OtherVariant::C").field(e).finish()296}297}298}299}300const _: () = {301assert!(30212 == < OtherVariant as wasmtime::component::ComponentType >::SIZE32303);304assert!(3054 == < OtherVariant as wasmtime::component::ComponentType >::ALIGN32306);307};308#[derive(wasmtime::component::ComponentType)]309#[derive(wasmtime::component::Lift)]310#[derive(wasmtime::component::Lower)]311#[component(variant)]312#[derive(Clone)]313pub enum SomeVariant {314#[component(name = "a")]315A(wasmtime::component::__internal::String),316#[component(name = "b")]317B,318#[component(name = "c")]319C(u32),320#[component(name = "d")]321D(wasmtime::component::__internal::Vec<OtherVariant>),322}323impl core::fmt::Debug for SomeVariant {324fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {325match self {326SomeVariant::A(e) => {327f.debug_tuple("SomeVariant::A").field(e).finish()328}329SomeVariant::B => f.debug_tuple("SomeVariant::B").finish(),330SomeVariant::C(e) => {331f.debug_tuple("SomeVariant::C").field(e).finish()332}333SomeVariant::D(e) => {334f.debug_tuple("SomeVariant::D").field(e).finish()335}336}337}338}339const _: () = {340assert!(34112 == < SomeVariant as wasmtime::component::ComponentType >::SIZE32342);343assert!(3444 == < SomeVariant as wasmtime::component::ComponentType >::ALIGN32345);346};347pub type LoadStoreAllSizes = wasmtime::component::__internal::Vec<348(349wasmtime::component::__internal::String,350u8,351i8,352u16,353i16,354u32,355i32,356u64,357i64,358f32,359f64,360char,361),362>;363const _: () = {364assert!(3658 == < LoadStoreAllSizes as wasmtime::component::ComponentType366>::SIZE32367);368assert!(3694 == < LoadStoreAllSizes as wasmtime::component::ComponentType370>::ALIGN32371);372};373pub trait HostWithStore: wasmtime::component::HasData + Send {374fn list_u8_param<T>(375accessor: &wasmtime::component::Accessor<T, Self>,376x: wasmtime::component::__internal::Vec<u8>,377) -> impl ::core::future::Future<Output = ()> + Send;378fn list_u16_param<T>(379accessor: &wasmtime::component::Accessor<T, Self>,380x: wasmtime::component::__internal::Vec<u16>,381) -> impl ::core::future::Future<Output = ()> + Send;382fn list_u32_param<T>(383accessor: &wasmtime::component::Accessor<T, Self>,384x: wasmtime::component::__internal::Vec<u32>,385) -> impl ::core::future::Future<Output = ()> + Send;386fn list_u64_param<T>(387accessor: &wasmtime::component::Accessor<T, Self>,388x: wasmtime::component::__internal::Vec<u64>,389) -> impl ::core::future::Future<Output = ()> + Send;390fn list_s8_param<T>(391accessor: &wasmtime::component::Accessor<T, Self>,392x: wasmtime::component::__internal::Vec<i8>,393) -> impl ::core::future::Future<Output = ()> + Send;394fn list_s16_param<T>(395accessor: &wasmtime::component::Accessor<T, Self>,396x: wasmtime::component::__internal::Vec<i16>,397) -> impl ::core::future::Future<Output = ()> + Send;398fn list_s32_param<T>(399accessor: &wasmtime::component::Accessor<T, Self>,400x: wasmtime::component::__internal::Vec<i32>,401) -> impl ::core::future::Future<Output = ()> + Send;402fn list_s64_param<T>(403accessor: &wasmtime::component::Accessor<T, Self>,404x: wasmtime::component::__internal::Vec<i64>,405) -> impl ::core::future::Future<Output = ()> + Send;406fn list_f32_param<T>(407accessor: &wasmtime::component::Accessor<T, Self>,408x: wasmtime::component::__internal::Vec<f32>,409) -> impl ::core::future::Future<Output = ()> + Send;410fn list_f64_param<T>(411accessor: &wasmtime::component::Accessor<T, Self>,412x: wasmtime::component::__internal::Vec<f64>,413) -> impl ::core::future::Future<Output = ()> + Send;414fn list_u8_ret<T>(415accessor: &wasmtime::component::Accessor<T, Self>,416) -> impl ::core::future::Future<417Output = wasmtime::component::__internal::Vec<u8>,418> + Send;419fn list_u16_ret<T>(420accessor: &wasmtime::component::Accessor<T, Self>,421) -> impl ::core::future::Future<422Output = wasmtime::component::__internal::Vec<u16>,423> + Send;424fn list_u32_ret<T>(425accessor: &wasmtime::component::Accessor<T, Self>,426) -> impl ::core::future::Future<427Output = wasmtime::component::__internal::Vec<u32>,428> + Send;429fn list_u64_ret<T>(430accessor: &wasmtime::component::Accessor<T, Self>,431) -> impl ::core::future::Future<432Output = wasmtime::component::__internal::Vec<u64>,433> + Send;434fn list_s8_ret<T>(435accessor: &wasmtime::component::Accessor<T, Self>,436) -> impl ::core::future::Future<437Output = wasmtime::component::__internal::Vec<i8>,438> + Send;439fn list_s16_ret<T>(440accessor: &wasmtime::component::Accessor<T, Self>,441) -> impl ::core::future::Future<442Output = wasmtime::component::__internal::Vec<i16>,443> + Send;444fn list_s32_ret<T>(445accessor: &wasmtime::component::Accessor<T, Self>,446) -> impl ::core::future::Future<447Output = wasmtime::component::__internal::Vec<i32>,448> + Send;449fn list_s64_ret<T>(450accessor: &wasmtime::component::Accessor<T, Self>,451) -> impl ::core::future::Future<452Output = wasmtime::component::__internal::Vec<i64>,453> + Send;454fn list_f32_ret<T>(455accessor: &wasmtime::component::Accessor<T, Self>,456) -> impl ::core::future::Future<457Output = wasmtime::component::__internal::Vec<f32>,458> + Send;459fn list_f64_ret<T>(460accessor: &wasmtime::component::Accessor<T, Self>,461) -> impl ::core::future::Future<462Output = wasmtime::component::__internal::Vec<f64>,463> + Send;464fn tuple_list<T>(465accessor: &wasmtime::component::Accessor<T, Self>,466x: wasmtime::component::__internal::Vec<(u8, i8)>,467) -> impl ::core::future::Future<468Output = wasmtime::component::__internal::Vec<(i64, u32)>,469> + Send;470fn string_list_arg<T>(471accessor: &wasmtime::component::Accessor<T, Self>,472a: wasmtime::component::__internal::Vec<473wasmtime::component::__internal::String,474>,475) -> impl ::core::future::Future<Output = ()> + Send;476fn string_list_ret<T>(477accessor: &wasmtime::component::Accessor<T, Self>,478) -> impl ::core::future::Future<479Output = wasmtime::component::__internal::Vec<480wasmtime::component::__internal::String,481>,482> + Send;483fn tuple_string_list<T>(484accessor: &wasmtime::component::Accessor<T, Self>,485x: wasmtime::component::__internal::Vec<486(u8, wasmtime::component::__internal::String),487>,488) -> impl ::core::future::Future<489Output = wasmtime::component::__internal::Vec<490(wasmtime::component::__internal::String, u8),491>,492> + Send;493fn string_list<T>(494accessor: &wasmtime::component::Accessor<T, Self>,495x: wasmtime::component::__internal::Vec<496wasmtime::component::__internal::String,497>,498) -> impl ::core::future::Future<499Output = wasmtime::component::__internal::Vec<500wasmtime::component::__internal::String,501>,502> + Send;503fn record_list<T>(504accessor: &wasmtime::component::Accessor<T, Self>,505x: wasmtime::component::__internal::Vec<SomeRecord>,506) -> impl ::core::future::Future<507Output = wasmtime::component::__internal::Vec<OtherRecord>,508> + Send;509fn record_list_reverse<T>(510accessor: &wasmtime::component::Accessor<T, Self>,511x: wasmtime::component::__internal::Vec<OtherRecord>,512) -> impl ::core::future::Future<513Output = wasmtime::component::__internal::Vec<SomeRecord>,514> + Send;515fn variant_list<T>(516accessor: &wasmtime::component::Accessor<T, Self>,517x: wasmtime::component::__internal::Vec<SomeVariant>,518) -> impl ::core::future::Future<519Output = wasmtime::component::__internal::Vec<OtherVariant>,520> + Send;521fn load_store_everything<T>(522accessor: &wasmtime::component::Accessor<T, Self>,523a: LoadStoreAllSizes,524) -> impl ::core::future::Future<Output = LoadStoreAllSizes> + Send;525}526pub trait Host: Send {}527impl<_T: Host + ?Sized + Send> Host for &mut _T {}528pub fn add_to_linker<T, D>(529linker: &mut wasmtime::component::Linker<T>,530host_getter: fn(&mut T) -> D::Data<'_>,531) -> wasmtime::Result<()>532where533D: HostWithStore,534for<'a> D::Data<'a>: Host,535T: 'static + Send,536{537let mut inst = linker.instance("foo:foo/lists")?;538inst.func_wrap_concurrent(539"list-u8-param",540move |541caller: &wasmtime::component::Accessor<T>,542(arg0,): (wasmtime::component::__internal::Vec<u8>,)|543{544wasmtime::component::__internal::Box::pin(async move {545let host = &caller.with_getter(host_getter);546let r = <D as HostWithStore>::list_u8_param(host, arg0)547.await;548Ok(r)549})550},551)?;552inst.func_wrap_concurrent(553"list-u16-param",554move |555caller: &wasmtime::component::Accessor<T>,556(arg0,): (wasmtime::component::__internal::Vec<u16>,)|557{558wasmtime::component::__internal::Box::pin(async move {559let host = &caller.with_getter(host_getter);560let r = <D as HostWithStore>::list_u16_param(host, arg0)561.await;562Ok(r)563})564},565)?;566inst.func_wrap_concurrent(567"list-u32-param",568move |569caller: &wasmtime::component::Accessor<T>,570(arg0,): (wasmtime::component::__internal::Vec<u32>,)|571{572wasmtime::component::__internal::Box::pin(async move {573let host = &caller.with_getter(host_getter);574let r = <D as HostWithStore>::list_u32_param(host, arg0)575.await;576Ok(r)577})578},579)?;580inst.func_wrap_concurrent(581"list-u64-param",582move |583caller: &wasmtime::component::Accessor<T>,584(arg0,): (wasmtime::component::__internal::Vec<u64>,)|585{586wasmtime::component::__internal::Box::pin(async move {587let host = &caller.with_getter(host_getter);588let r = <D as HostWithStore>::list_u64_param(host, arg0)589.await;590Ok(r)591})592},593)?;594inst.func_wrap_concurrent(595"list-s8-param",596move |597caller: &wasmtime::component::Accessor<T>,598(arg0,): (wasmtime::component::__internal::Vec<i8>,)|599{600wasmtime::component::__internal::Box::pin(async move {601let host = &caller.with_getter(host_getter);602let r = <D as HostWithStore>::list_s8_param(host, arg0)603.await;604Ok(r)605})606},607)?;608inst.func_wrap_concurrent(609"list-s16-param",610move |611caller: &wasmtime::component::Accessor<T>,612(arg0,): (wasmtime::component::__internal::Vec<i16>,)|613{614wasmtime::component::__internal::Box::pin(async move {615let host = &caller.with_getter(host_getter);616let r = <D as HostWithStore>::list_s16_param(host, arg0)617.await;618Ok(r)619})620},621)?;622inst.func_wrap_concurrent(623"list-s32-param",624move |625caller: &wasmtime::component::Accessor<T>,626(arg0,): (wasmtime::component::__internal::Vec<i32>,)|627{628wasmtime::component::__internal::Box::pin(async move {629let host = &caller.with_getter(host_getter);630let r = <D as HostWithStore>::list_s32_param(host, arg0)631.await;632Ok(r)633})634},635)?;636inst.func_wrap_concurrent(637"list-s64-param",638move |639caller: &wasmtime::component::Accessor<T>,640(arg0,): (wasmtime::component::__internal::Vec<i64>,)|641{642wasmtime::component::__internal::Box::pin(async move {643let host = &caller.with_getter(host_getter);644let r = <D as HostWithStore>::list_s64_param(host, arg0)645.await;646Ok(r)647})648},649)?;650inst.func_wrap_concurrent(651"list-f32-param",652move |653caller: &wasmtime::component::Accessor<T>,654(arg0,): (wasmtime::component::__internal::Vec<f32>,)|655{656wasmtime::component::__internal::Box::pin(async move {657let host = &caller.with_getter(host_getter);658let r = <D as HostWithStore>::list_f32_param(host, arg0)659.await;660Ok(r)661})662},663)?;664inst.func_wrap_concurrent(665"list-f64-param",666move |667caller: &wasmtime::component::Accessor<T>,668(arg0,): (wasmtime::component::__internal::Vec<f64>,)|669{670wasmtime::component::__internal::Box::pin(async move {671let host = &caller.with_getter(host_getter);672let r = <D as HostWithStore>::list_f64_param(host, arg0)673.await;674Ok(r)675})676},677)?;678inst.func_wrap_concurrent(679"list-u8-ret",680move |caller: &wasmtime::component::Accessor<T>, (): ()| {681wasmtime::component::__internal::Box::pin(async move {682let host = &caller.with_getter(host_getter);683let r = <D as HostWithStore>::list_u8_ret(host).await;684Ok((r,))685})686},687)?;688inst.func_wrap_concurrent(689"list-u16-ret",690move |caller: &wasmtime::component::Accessor<T>, (): ()| {691wasmtime::component::__internal::Box::pin(async move {692let host = &caller.with_getter(host_getter);693let r = <D as HostWithStore>::list_u16_ret(host).await;694Ok((r,))695})696},697)?;698inst.func_wrap_concurrent(699"list-u32-ret",700move |caller: &wasmtime::component::Accessor<T>, (): ()| {701wasmtime::component::__internal::Box::pin(async move {702let host = &caller.with_getter(host_getter);703let r = <D as HostWithStore>::list_u32_ret(host).await;704Ok((r,))705})706},707)?;708inst.func_wrap_concurrent(709"list-u64-ret",710move |caller: &wasmtime::component::Accessor<T>, (): ()| {711wasmtime::component::__internal::Box::pin(async move {712let host = &caller.with_getter(host_getter);713let r = <D as HostWithStore>::list_u64_ret(host).await;714Ok((r,))715})716},717)?;718inst.func_wrap_concurrent(719"list-s8-ret",720move |caller: &wasmtime::component::Accessor<T>, (): ()| {721wasmtime::component::__internal::Box::pin(async move {722let host = &caller.with_getter(host_getter);723let r = <D as HostWithStore>::list_s8_ret(host).await;724Ok((r,))725})726},727)?;728inst.func_wrap_concurrent(729"list-s16-ret",730move |caller: &wasmtime::component::Accessor<T>, (): ()| {731wasmtime::component::__internal::Box::pin(async move {732let host = &caller.with_getter(host_getter);733let r = <D as HostWithStore>::list_s16_ret(host).await;734Ok((r,))735})736},737)?;738inst.func_wrap_concurrent(739"list-s32-ret",740move |caller: &wasmtime::component::Accessor<T>, (): ()| {741wasmtime::component::__internal::Box::pin(async move {742let host = &caller.with_getter(host_getter);743let r = <D as HostWithStore>::list_s32_ret(host).await;744Ok((r,))745})746},747)?;748inst.func_wrap_concurrent(749"list-s64-ret",750move |caller: &wasmtime::component::Accessor<T>, (): ()| {751wasmtime::component::__internal::Box::pin(async move {752let host = &caller.with_getter(host_getter);753let r = <D as HostWithStore>::list_s64_ret(host).await;754Ok((r,))755})756},757)?;758inst.func_wrap_concurrent(759"list-f32-ret",760move |caller: &wasmtime::component::Accessor<T>, (): ()| {761wasmtime::component::__internal::Box::pin(async move {762let host = &caller.with_getter(host_getter);763let r = <D as HostWithStore>::list_f32_ret(host).await;764Ok((r,))765})766},767)?;768inst.func_wrap_concurrent(769"list-f64-ret",770move |caller: &wasmtime::component::Accessor<T>, (): ()| {771wasmtime::component::__internal::Box::pin(async move {772let host = &caller.with_getter(host_getter);773let r = <D as HostWithStore>::list_f64_ret(host).await;774Ok((r,))775})776},777)?;778inst.func_wrap_concurrent(779"tuple-list",780move |781caller: &wasmtime::component::Accessor<T>,782(arg0,): (wasmtime::component::__internal::Vec<(u8, i8)>,)|783{784wasmtime::component::__internal::Box::pin(async move {785let host = &caller.with_getter(host_getter);786let r = <D as HostWithStore>::tuple_list(host, arg0).await;787Ok((r,))788})789},790)?;791inst.func_wrap_concurrent(792"string-list-arg",793move |794caller: &wasmtime::component::Accessor<T>,795(796arg0,797): (798wasmtime::component::__internal::Vec<799wasmtime::component::__internal::String,800>,801)|802{803wasmtime::component::__internal::Box::pin(async move {804let host = &caller.with_getter(host_getter);805let r = <D as HostWithStore>::string_list_arg(host, arg0)806.await;807Ok(r)808})809},810)?;811inst.func_wrap_concurrent(812"string-list-ret",813move |caller: &wasmtime::component::Accessor<T>, (): ()| {814wasmtime::component::__internal::Box::pin(async move {815let host = &caller.with_getter(host_getter);816let r = <D as HostWithStore>::string_list_ret(host).await;817Ok((r,))818})819},820)?;821inst.func_wrap_concurrent(822"tuple-string-list",823move |824caller: &wasmtime::component::Accessor<T>,825(826arg0,827): (828wasmtime::component::__internal::Vec<829(u8, wasmtime::component::__internal::String),830>,831)|832{833wasmtime::component::__internal::Box::pin(async move {834let host = &caller.with_getter(host_getter);835let r = <D as HostWithStore>::tuple_string_list(host, arg0)836.await;837Ok((r,))838})839},840)?;841inst.func_wrap_concurrent(842"string-list",843move |844caller: &wasmtime::component::Accessor<T>,845(846arg0,847): (848wasmtime::component::__internal::Vec<849wasmtime::component::__internal::String,850>,851)|852{853wasmtime::component::__internal::Box::pin(async move {854let host = &caller.with_getter(host_getter);855let r = <D as HostWithStore>::string_list(host, arg0).await;856Ok((r,))857})858},859)?;860inst.func_wrap_concurrent(861"record-list",862move |863caller: &wasmtime::component::Accessor<T>,864(arg0,): (wasmtime::component::__internal::Vec<SomeRecord>,)|865{866wasmtime::component::__internal::Box::pin(async move {867let host = &caller.with_getter(host_getter);868let r = <D as HostWithStore>::record_list(host, arg0).await;869Ok((r,))870})871},872)?;873inst.func_wrap_concurrent(874"record-list-reverse",875move |876caller: &wasmtime::component::Accessor<T>,877(arg0,): (wasmtime::component::__internal::Vec<OtherRecord>,)|878{879wasmtime::component::__internal::Box::pin(async move {880let host = &caller.with_getter(host_getter);881let r = <D as HostWithStore>::record_list_reverse(host, arg0)882.await;883Ok((r,))884})885},886)?;887inst.func_wrap_concurrent(888"variant-list",889move |890caller: &wasmtime::component::Accessor<T>,891(arg0,): (wasmtime::component::__internal::Vec<SomeVariant>,)|892{893wasmtime::component::__internal::Box::pin(async move {894let host = &caller.with_getter(host_getter);895let r = <D as HostWithStore>::variant_list(host, arg0).await;896Ok((r,))897})898},899)?;900inst.func_wrap_concurrent(901"load-store-everything",902move |903caller: &wasmtime::component::Accessor<T>,904(arg0,): (LoadStoreAllSizes,)|905{906wasmtime::component::__internal::Box::pin(async move {907let host = &caller.with_getter(host_getter);908let r = <D as HostWithStore>::load_store_everything(909host,910arg0,911)912.await;913Ok((r,))914})915},916)?;917Ok(())918}919}920}921}922pub mod exports {923pub mod foo {924pub mod foo {925#[allow(clippy::all)]926pub mod lists {927#[allow(unused_imports)]928use wasmtime::component::__internal::{anyhow, Box};929#[derive(wasmtime::component::ComponentType)]930#[derive(wasmtime::component::Lift)]931#[derive(wasmtime::component::Lower)]932#[component(record)]933#[derive(Clone)]934pub struct OtherRecord {935#[component(name = "a1")]936pub a1: u32,937#[component(name = "a2")]938pub a2: u64,939#[component(name = "a3")]940pub a3: i32,941#[component(name = "a4")]942pub a4: i64,943#[component(name = "b")]944pub b: wasmtime::component::__internal::String,945#[component(name = "c")]946pub c: wasmtime::component::__internal::Vec<u8>,947}948impl core::fmt::Debug for OtherRecord {949fn fmt(950&self,951f: &mut core::fmt::Formatter<'_>,952) -> core::fmt::Result {953f.debug_struct("OtherRecord")954.field("a1", &self.a1)955.field("a2", &self.a2)956.field("a3", &self.a3)957.field("a4", &self.a4)958.field("b", &self.b)959.field("c", &self.c)960.finish()961}962}963const _: () = {964assert!(96548 == < OtherRecord as wasmtime::component::ComponentType966>::SIZE32967);968assert!(9698 == < OtherRecord as wasmtime::component::ComponentType970>::ALIGN32971);972};973#[derive(wasmtime::component::ComponentType)]974#[derive(wasmtime::component::Lift)]975#[derive(wasmtime::component::Lower)]976#[component(record)]977#[derive(Clone)]978pub struct SomeRecord {979#[component(name = "x")]980pub x: wasmtime::component::__internal::String,981#[component(name = "y")]982pub y: OtherRecord,983#[component(name = "z")]984pub z: wasmtime::component::__internal::Vec<OtherRecord>,985#[component(name = "c1")]986pub c1: u32,987#[component(name = "c2")]988pub c2: u64,989#[component(name = "c3")]990pub c3: i32,991#[component(name = "c4")]992pub c4: i64,993}994impl core::fmt::Debug for SomeRecord {995fn fmt(996&self,997f: &mut core::fmt::Formatter<'_>,998) -> core::fmt::Result {999f.debug_struct("SomeRecord")1000.field("x", &self.x)1001.field("y", &self.y)1002.field("z", &self.z)1003.field("c1", &self.c1)1004.field("c2", &self.c2)1005.field("c3", &self.c3)1006.field("c4", &self.c4)1007.finish()1008}1009}1010const _: () = {1011assert!(101296 == < SomeRecord as wasmtime::component::ComponentType1013>::SIZE321014);1015assert!(10168 == < SomeRecord as wasmtime::component::ComponentType1017>::ALIGN321018);1019};1020#[derive(wasmtime::component::ComponentType)]1021#[derive(wasmtime::component::Lift)]1022#[derive(wasmtime::component::Lower)]1023#[component(variant)]1024#[derive(Clone)]1025pub enum OtherVariant {1026#[component(name = "a")]1027A,1028#[component(name = "b")]1029B(u32),1030#[component(name = "c")]1031C(wasmtime::component::__internal::String),1032}1033impl core::fmt::Debug for OtherVariant {1034fn fmt(1035&self,1036f: &mut core::fmt::Formatter<'_>,1037) -> core::fmt::Result {1038match self {1039OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),1040OtherVariant::B(e) => {1041f.debug_tuple("OtherVariant::B").field(e).finish()1042}1043OtherVariant::C(e) => {1044f.debug_tuple("OtherVariant::C").field(e).finish()1045}1046}1047}1048}1049const _: () = {1050assert!(105112 == < OtherVariant as wasmtime::component::ComponentType1052>::SIZE321053);1054assert!(10554 == < OtherVariant as wasmtime::component::ComponentType1056>::ALIGN321057);1058};1059#[derive(wasmtime::component::ComponentType)]1060#[derive(wasmtime::component::Lift)]1061#[derive(wasmtime::component::Lower)]1062#[component(variant)]1063#[derive(Clone)]1064pub enum SomeVariant {1065#[component(name = "a")]1066A(wasmtime::component::__internal::String),1067#[component(name = "b")]1068B,1069#[component(name = "c")]1070C(u32),1071#[component(name = "d")]1072D(wasmtime::component::__internal::Vec<OtherVariant>),1073}1074impl core::fmt::Debug for SomeVariant {1075fn fmt(1076&self,1077f: &mut core::fmt::Formatter<'_>,1078) -> core::fmt::Result {1079match self {1080SomeVariant::A(e) => {1081f.debug_tuple("SomeVariant::A").field(e).finish()1082}1083SomeVariant::B => f.debug_tuple("SomeVariant::B").finish(),1084SomeVariant::C(e) => {1085f.debug_tuple("SomeVariant::C").field(e).finish()1086}1087SomeVariant::D(e) => {1088f.debug_tuple("SomeVariant::D").field(e).finish()1089}1090}1091}1092}1093const _: () = {1094assert!(109512 == < SomeVariant as wasmtime::component::ComponentType1096>::SIZE321097);1098assert!(10994 == < SomeVariant as wasmtime::component::ComponentType1100>::ALIGN321101);1102};1103pub type LoadStoreAllSizes = wasmtime::component::__internal::Vec<1104(1105wasmtime::component::__internal::String,1106u8,1107i8,1108u16,1109i16,1110u32,1111i32,1112u64,1113i64,1114f32,1115f64,1116char,1117),1118>;1119const _: () = {1120assert!(11218 == < LoadStoreAllSizes as wasmtime::component::ComponentType1122>::SIZE321123);1124assert!(11254 == < LoadStoreAllSizes as wasmtime::component::ComponentType1126>::ALIGN321127);1128};1129pub struct Guest {1130list_u8_param: wasmtime::component::Func,1131list_u16_param: wasmtime::component::Func,1132list_u32_param: wasmtime::component::Func,1133list_u64_param: wasmtime::component::Func,1134list_s8_param: wasmtime::component::Func,1135list_s16_param: wasmtime::component::Func,1136list_s32_param: wasmtime::component::Func,1137list_s64_param: wasmtime::component::Func,1138list_f32_param: wasmtime::component::Func,1139list_f64_param: wasmtime::component::Func,1140list_u8_ret: wasmtime::component::Func,1141list_u16_ret: wasmtime::component::Func,1142list_u32_ret: wasmtime::component::Func,1143list_u64_ret: wasmtime::component::Func,1144list_s8_ret: wasmtime::component::Func,1145list_s16_ret: wasmtime::component::Func,1146list_s32_ret: wasmtime::component::Func,1147list_s64_ret: wasmtime::component::Func,1148list_f32_ret: wasmtime::component::Func,1149list_f64_ret: wasmtime::component::Func,1150tuple_list: wasmtime::component::Func,1151string_list_arg: wasmtime::component::Func,1152string_list_ret: wasmtime::component::Func,1153tuple_string_list: wasmtime::component::Func,1154string_list: wasmtime::component::Func,1155record_list: wasmtime::component::Func,1156record_list_reverse: wasmtime::component::Func,1157variant_list: wasmtime::component::Func,1158load_store_everything: wasmtime::component::Func,1159}1160#[derive(Clone)]1161pub struct GuestIndices {1162list_u8_param: wasmtime::component::ComponentExportIndex,1163list_u16_param: wasmtime::component::ComponentExportIndex,1164list_u32_param: wasmtime::component::ComponentExportIndex,1165list_u64_param: wasmtime::component::ComponentExportIndex,1166list_s8_param: wasmtime::component::ComponentExportIndex,1167list_s16_param: wasmtime::component::ComponentExportIndex,1168list_s32_param: wasmtime::component::ComponentExportIndex,1169list_s64_param: wasmtime::component::ComponentExportIndex,1170list_f32_param: wasmtime::component::ComponentExportIndex,1171list_f64_param: wasmtime::component::ComponentExportIndex,1172list_u8_ret: wasmtime::component::ComponentExportIndex,1173list_u16_ret: wasmtime::component::ComponentExportIndex,1174list_u32_ret: wasmtime::component::ComponentExportIndex,1175list_u64_ret: wasmtime::component::ComponentExportIndex,1176list_s8_ret: wasmtime::component::ComponentExportIndex,1177list_s16_ret: wasmtime::component::ComponentExportIndex,1178list_s32_ret: wasmtime::component::ComponentExportIndex,1179list_s64_ret: wasmtime::component::ComponentExportIndex,1180list_f32_ret: wasmtime::component::ComponentExportIndex,1181list_f64_ret: wasmtime::component::ComponentExportIndex,1182tuple_list: wasmtime::component::ComponentExportIndex,1183string_list_arg: wasmtime::component::ComponentExportIndex,1184string_list_ret: wasmtime::component::ComponentExportIndex,1185tuple_string_list: wasmtime::component::ComponentExportIndex,1186string_list: wasmtime::component::ComponentExportIndex,1187record_list: wasmtime::component::ComponentExportIndex,1188record_list_reverse: wasmtime::component::ComponentExportIndex,1189variant_list: wasmtime::component::ComponentExportIndex,1190load_store_everything: wasmtime::component::ComponentExportIndex,1191}1192impl GuestIndices {1193/// Constructor for [`GuestIndices`] which takes a1194/// [`Component`](wasmtime::component::Component) as input and can be executed1195/// before instantiation.1196///1197/// This constructor can be used to front-load string lookups to find exports1198/// within a component.1199pub fn new<_T>(1200_instance_pre: &wasmtime::component::InstancePre<_T>,1201) -> wasmtime::Result<GuestIndices> {1202let instance = _instance_pre1203.component()1204.get_export_index(None, "foo:foo/lists")1205.ok_or_else(|| {1206anyhow::anyhow!(1207"no exported instance named `foo:foo/lists`"1208)1209})?;1210let mut lookup = move |name| {1211_instance_pre1212.component()1213.get_export_index(Some(&instance), name)1214.ok_or_else(|| {1215anyhow::anyhow!(1216"instance export `foo:foo/lists` does \1217not have export `{name}`"1218)1219})1220};1221let _ = &mut lookup;1222let list_u8_param = lookup("list-u8-param")?;1223let list_u16_param = lookup("list-u16-param")?;1224let list_u32_param = lookup("list-u32-param")?;1225let list_u64_param = lookup("list-u64-param")?;1226let list_s8_param = lookup("list-s8-param")?;1227let list_s16_param = lookup("list-s16-param")?;1228let list_s32_param = lookup("list-s32-param")?;1229let list_s64_param = lookup("list-s64-param")?;1230let list_f32_param = lookup("list-f32-param")?;1231let list_f64_param = lookup("list-f64-param")?;1232let list_u8_ret = lookup("list-u8-ret")?;1233let list_u16_ret = lookup("list-u16-ret")?;1234let list_u32_ret = lookup("list-u32-ret")?;1235let list_u64_ret = lookup("list-u64-ret")?;1236let list_s8_ret = lookup("list-s8-ret")?;1237let list_s16_ret = lookup("list-s16-ret")?;1238let list_s32_ret = lookup("list-s32-ret")?;1239let list_s64_ret = lookup("list-s64-ret")?;1240let list_f32_ret = lookup("list-f32-ret")?;1241let list_f64_ret = lookup("list-f64-ret")?;1242let tuple_list = lookup("tuple-list")?;1243let string_list_arg = lookup("string-list-arg")?;1244let string_list_ret = lookup("string-list-ret")?;1245let tuple_string_list = lookup("tuple-string-list")?;1246let string_list = lookup("string-list")?;1247let record_list = lookup("record-list")?;1248let record_list_reverse = lookup("record-list-reverse")?;1249let variant_list = lookup("variant-list")?;1250let load_store_everything = lookup("load-store-everything")?;1251Ok(GuestIndices {1252list_u8_param,1253list_u16_param,1254list_u32_param,1255list_u64_param,1256list_s8_param,1257list_s16_param,1258list_s32_param,1259list_s64_param,1260list_f32_param,1261list_f64_param,1262list_u8_ret,1263list_u16_ret,1264list_u32_ret,1265list_u64_ret,1266list_s8_ret,1267list_s16_ret,1268list_s32_ret,1269list_s64_ret,1270list_f32_ret,1271list_f64_ret,1272tuple_list,1273string_list_arg,1274string_list_ret,1275tuple_string_list,1276string_list,1277record_list,1278record_list_reverse,1279variant_list,1280load_store_everything,1281})1282}1283pub fn load(1284&self,1285mut store: impl wasmtime::AsContextMut,1286instance: &wasmtime::component::Instance,1287) -> wasmtime::Result<Guest> {1288let _instance = instance;1289let _instance_pre = _instance.instance_pre(&store);1290let _instance_type = _instance_pre.instance_type();1291let mut store = store.as_context_mut();1292let _ = &mut store;1293let list_u8_param = *_instance1294.get_typed_func::<1295(&[u8],),1296(),1297>(&mut store, &self.list_u8_param)?1298.func();1299let list_u16_param = *_instance1300.get_typed_func::<1301(&[u16],),1302(),1303>(&mut store, &self.list_u16_param)?1304.func();1305let list_u32_param = *_instance1306.get_typed_func::<1307(&[u32],),1308(),1309>(&mut store, &self.list_u32_param)?1310.func();1311let list_u64_param = *_instance1312.get_typed_func::<1313(&[u64],),1314(),1315>(&mut store, &self.list_u64_param)?1316.func();1317let list_s8_param = *_instance1318.get_typed_func::<1319(&[i8],),1320(),1321>(&mut store, &self.list_s8_param)?1322.func();1323let list_s16_param = *_instance1324.get_typed_func::<1325(&[i16],),1326(),1327>(&mut store, &self.list_s16_param)?1328.func();1329let list_s32_param = *_instance1330.get_typed_func::<1331(&[i32],),1332(),1333>(&mut store, &self.list_s32_param)?1334.func();1335let list_s64_param = *_instance1336.get_typed_func::<1337(&[i64],),1338(),1339>(&mut store, &self.list_s64_param)?1340.func();1341let list_f32_param = *_instance1342.get_typed_func::<1343(&[f32],),1344(),1345>(&mut store, &self.list_f32_param)?1346.func();1347let list_f64_param = *_instance1348.get_typed_func::<1349(&[f64],),1350(),1351>(&mut store, &self.list_f64_param)?1352.func();1353let list_u8_ret = *_instance1354.get_typed_func::<1355(),1356(wasmtime::component::__internal::Vec<u8>,),1357>(&mut store, &self.list_u8_ret)?1358.func();1359let list_u16_ret = *_instance1360.get_typed_func::<1361(),1362(wasmtime::component::__internal::Vec<u16>,),1363>(&mut store, &self.list_u16_ret)?1364.func();1365let list_u32_ret = *_instance1366.get_typed_func::<1367(),1368(wasmtime::component::__internal::Vec<u32>,),1369>(&mut store, &self.list_u32_ret)?1370.func();1371let list_u64_ret = *_instance1372.get_typed_func::<1373(),1374(wasmtime::component::__internal::Vec<u64>,),1375>(&mut store, &self.list_u64_ret)?1376.func();1377let list_s8_ret = *_instance1378.get_typed_func::<1379(),1380(wasmtime::component::__internal::Vec<i8>,),1381>(&mut store, &self.list_s8_ret)?1382.func();1383let list_s16_ret = *_instance1384.get_typed_func::<1385(),1386(wasmtime::component::__internal::Vec<i16>,),1387>(&mut store, &self.list_s16_ret)?1388.func();1389let list_s32_ret = *_instance1390.get_typed_func::<1391(),1392(wasmtime::component::__internal::Vec<i32>,),1393>(&mut store, &self.list_s32_ret)?1394.func();1395let list_s64_ret = *_instance1396.get_typed_func::<1397(),1398(wasmtime::component::__internal::Vec<i64>,),1399>(&mut store, &self.list_s64_ret)?1400.func();1401let list_f32_ret = *_instance1402.get_typed_func::<1403(),1404(wasmtime::component::__internal::Vec<f32>,),1405>(&mut store, &self.list_f32_ret)?1406.func();1407let list_f64_ret = *_instance1408.get_typed_func::<1409(),1410(wasmtime::component::__internal::Vec<f64>,),1411>(&mut store, &self.list_f64_ret)?1412.func();1413let tuple_list = *_instance1414.get_typed_func::<1415(&[(u8, i8)],),1416(wasmtime::component::__internal::Vec<(i64, u32)>,),1417>(&mut store, &self.tuple_list)?1418.func();1419let string_list_arg = *_instance1420.get_typed_func::<1421(&[wasmtime::component::__internal::String],),1422(),1423>(&mut store, &self.string_list_arg)?1424.func();1425let string_list_ret = *_instance1426.get_typed_func::<1427(),1428(1429wasmtime::component::__internal::Vec<1430wasmtime::component::__internal::String,1431>,1432),1433>(&mut store, &self.string_list_ret)?1434.func();1435let tuple_string_list = *_instance1436.get_typed_func::<1437(&[(u8, wasmtime::component::__internal::String)],),1438(1439wasmtime::component::__internal::Vec<1440(wasmtime::component::__internal::String, u8),1441>,1442),1443>(&mut store, &self.tuple_string_list)?1444.func();1445let string_list = *_instance1446.get_typed_func::<1447(&[wasmtime::component::__internal::String],),1448(1449wasmtime::component::__internal::Vec<1450wasmtime::component::__internal::String,1451>,1452),1453>(&mut store, &self.string_list)?1454.func();1455let record_list = *_instance1456.get_typed_func::<1457(&[SomeRecord],),1458(wasmtime::component::__internal::Vec<OtherRecord>,),1459>(&mut store, &self.record_list)?1460.func();1461let record_list_reverse = *_instance1462.get_typed_func::<1463(&[OtherRecord],),1464(wasmtime::component::__internal::Vec<SomeRecord>,),1465>(&mut store, &self.record_list_reverse)?1466.func();1467let variant_list = *_instance1468.get_typed_func::<1469(&[SomeVariant],),1470(wasmtime::component::__internal::Vec<OtherVariant>,),1471>(&mut store, &self.variant_list)?1472.func();1473let load_store_everything = *_instance1474.get_typed_func::<1475(&LoadStoreAllSizes,),1476(LoadStoreAllSizes,),1477>(&mut store, &self.load_store_everything)?1478.func();1479Ok(Guest {1480list_u8_param,1481list_u16_param,1482list_u32_param,1483list_u64_param,1484list_s8_param,1485list_s16_param,1486list_s32_param,1487list_s64_param,1488list_f32_param,1489list_f64_param,1490list_u8_ret,1491list_u16_ret,1492list_u32_ret,1493list_u64_ret,1494list_s8_ret,1495list_s16_ret,1496list_s32_ret,1497list_s64_ret,1498list_f32_ret,1499list_f64_ret,1500tuple_list,1501string_list_arg,1502string_list_ret,1503tuple_string_list,1504string_list,1505record_list,1506record_list_reverse,1507variant_list,1508load_store_everything,1509})1510}1511}1512impl Guest {1513pub async fn call_list_u8_param<_T, _D>(1514&self,1515accessor: &wasmtime::component::Accessor<_T, _D>,1516arg0: wasmtime::component::__internal::Vec<u8>,1517) -> wasmtime::Result<()>1518where1519_T: Send,1520_D: wasmtime::component::HasData,1521{1522let callee = unsafe {1523wasmtime::component::TypedFunc::<1524(wasmtime::component::__internal::Vec<u8>,),1525(),1526>::new_unchecked(self.list_u8_param)1527};1528let () = callee.call_concurrent(accessor, (arg0,)).await?;1529Ok(())1530}1531pub async fn call_list_u16_param<_T, _D>(1532&self,1533accessor: &wasmtime::component::Accessor<_T, _D>,1534arg0: wasmtime::component::__internal::Vec<u16>,1535) -> wasmtime::Result<()>1536where1537_T: Send,1538_D: wasmtime::component::HasData,1539{1540let callee = unsafe {1541wasmtime::component::TypedFunc::<1542(wasmtime::component::__internal::Vec<u16>,),1543(),1544>::new_unchecked(self.list_u16_param)1545};1546let () = callee.call_concurrent(accessor, (arg0,)).await?;1547Ok(())1548}1549pub async fn call_list_u32_param<_T, _D>(1550&self,1551accessor: &wasmtime::component::Accessor<_T, _D>,1552arg0: wasmtime::component::__internal::Vec<u32>,1553) -> wasmtime::Result<()>1554where1555_T: Send,1556_D: wasmtime::component::HasData,1557{1558let callee = unsafe {1559wasmtime::component::TypedFunc::<1560(wasmtime::component::__internal::Vec<u32>,),1561(),1562>::new_unchecked(self.list_u32_param)1563};1564let () = callee.call_concurrent(accessor, (arg0,)).await?;1565Ok(())1566}1567pub async fn call_list_u64_param<_T, _D>(1568&self,1569accessor: &wasmtime::component::Accessor<_T, _D>,1570arg0: wasmtime::component::__internal::Vec<u64>,1571) -> wasmtime::Result<()>1572where1573_T: Send,1574_D: wasmtime::component::HasData,1575{1576let callee = unsafe {1577wasmtime::component::TypedFunc::<1578(wasmtime::component::__internal::Vec<u64>,),1579(),1580>::new_unchecked(self.list_u64_param)1581};1582let () = callee.call_concurrent(accessor, (arg0,)).await?;1583Ok(())1584}1585pub async fn call_list_s8_param<_T, _D>(1586&self,1587accessor: &wasmtime::component::Accessor<_T, _D>,1588arg0: wasmtime::component::__internal::Vec<i8>,1589) -> wasmtime::Result<()>1590where1591_T: Send,1592_D: wasmtime::component::HasData,1593{1594let callee = unsafe {1595wasmtime::component::TypedFunc::<1596(wasmtime::component::__internal::Vec<i8>,),1597(),1598>::new_unchecked(self.list_s8_param)1599};1600let () = callee.call_concurrent(accessor, (arg0,)).await?;1601Ok(())1602}1603pub async fn call_list_s16_param<_T, _D>(1604&self,1605accessor: &wasmtime::component::Accessor<_T, _D>,1606arg0: wasmtime::component::__internal::Vec<i16>,1607) -> wasmtime::Result<()>1608where1609_T: Send,1610_D: wasmtime::component::HasData,1611{1612let callee = unsafe {1613wasmtime::component::TypedFunc::<1614(wasmtime::component::__internal::Vec<i16>,),1615(),1616>::new_unchecked(self.list_s16_param)1617};1618let () = callee.call_concurrent(accessor, (arg0,)).await?;1619Ok(())1620}1621pub async fn call_list_s32_param<_T, _D>(1622&self,1623accessor: &wasmtime::component::Accessor<_T, _D>,1624arg0: wasmtime::component::__internal::Vec<i32>,1625) -> wasmtime::Result<()>1626where1627_T: Send,1628_D: wasmtime::component::HasData,1629{1630let callee = unsafe {1631wasmtime::component::TypedFunc::<1632(wasmtime::component::__internal::Vec<i32>,),1633(),1634>::new_unchecked(self.list_s32_param)1635};1636let () = callee.call_concurrent(accessor, (arg0,)).await?;1637Ok(())1638}1639pub async fn call_list_s64_param<_T, _D>(1640&self,1641accessor: &wasmtime::component::Accessor<_T, _D>,1642arg0: wasmtime::component::__internal::Vec<i64>,1643) -> wasmtime::Result<()>1644where1645_T: Send,1646_D: wasmtime::component::HasData,1647{1648let callee = unsafe {1649wasmtime::component::TypedFunc::<1650(wasmtime::component::__internal::Vec<i64>,),1651(),1652>::new_unchecked(self.list_s64_param)1653};1654let () = callee.call_concurrent(accessor, (arg0,)).await?;1655Ok(())1656}1657pub async fn call_list_f32_param<_T, _D>(1658&self,1659accessor: &wasmtime::component::Accessor<_T, _D>,1660arg0: wasmtime::component::__internal::Vec<f32>,1661) -> wasmtime::Result<()>1662where1663_T: Send,1664_D: wasmtime::component::HasData,1665{1666let callee = unsafe {1667wasmtime::component::TypedFunc::<1668(wasmtime::component::__internal::Vec<f32>,),1669(),1670>::new_unchecked(self.list_f32_param)1671};1672let () = callee.call_concurrent(accessor, (arg0,)).await?;1673Ok(())1674}1675pub async fn call_list_f64_param<_T, _D>(1676&self,1677accessor: &wasmtime::component::Accessor<_T, _D>,1678arg0: wasmtime::component::__internal::Vec<f64>,1679) -> wasmtime::Result<()>1680where1681_T: Send,1682_D: wasmtime::component::HasData,1683{1684let callee = unsafe {1685wasmtime::component::TypedFunc::<1686(wasmtime::component::__internal::Vec<f64>,),1687(),1688>::new_unchecked(self.list_f64_param)1689};1690let () = callee.call_concurrent(accessor, (arg0,)).await?;1691Ok(())1692}1693pub async fn call_list_u8_ret<_T, _D>(1694&self,1695accessor: &wasmtime::component::Accessor<_T, _D>,1696) -> wasmtime::Result<wasmtime::component::__internal::Vec<u8>>1697where1698_T: Send,1699_D: wasmtime::component::HasData,1700{1701let callee = unsafe {1702wasmtime::component::TypedFunc::<1703(),1704(wasmtime::component::__internal::Vec<u8>,),1705>::new_unchecked(self.list_u8_ret)1706};1707let (ret0,) = callee.call_concurrent(accessor, ()).await?;1708Ok(ret0)1709}1710pub async fn call_list_u16_ret<_T, _D>(1711&self,1712accessor: &wasmtime::component::Accessor<_T, _D>,1713) -> wasmtime::Result<wasmtime::component::__internal::Vec<u16>>1714where1715_T: Send,1716_D: wasmtime::component::HasData,1717{1718let callee = unsafe {1719wasmtime::component::TypedFunc::<1720(),1721(wasmtime::component::__internal::Vec<u16>,),1722>::new_unchecked(self.list_u16_ret)1723};1724let (ret0,) = callee.call_concurrent(accessor, ()).await?;1725Ok(ret0)1726}1727pub async fn call_list_u32_ret<_T, _D>(1728&self,1729accessor: &wasmtime::component::Accessor<_T, _D>,1730) -> wasmtime::Result<wasmtime::component::__internal::Vec<u32>>1731where1732_T: Send,1733_D: wasmtime::component::HasData,1734{1735let callee = unsafe {1736wasmtime::component::TypedFunc::<1737(),1738(wasmtime::component::__internal::Vec<u32>,),1739>::new_unchecked(self.list_u32_ret)1740};1741let (ret0,) = callee.call_concurrent(accessor, ()).await?;1742Ok(ret0)1743}1744pub async fn call_list_u64_ret<_T, _D>(1745&self,1746accessor: &wasmtime::component::Accessor<_T, _D>,1747) -> wasmtime::Result<wasmtime::component::__internal::Vec<u64>>1748where1749_T: Send,1750_D: wasmtime::component::HasData,1751{1752let callee = unsafe {1753wasmtime::component::TypedFunc::<1754(),1755(wasmtime::component::__internal::Vec<u64>,),1756>::new_unchecked(self.list_u64_ret)1757};1758let (ret0,) = callee.call_concurrent(accessor, ()).await?;1759Ok(ret0)1760}1761pub async fn call_list_s8_ret<_T, _D>(1762&self,1763accessor: &wasmtime::component::Accessor<_T, _D>,1764) -> wasmtime::Result<wasmtime::component::__internal::Vec<i8>>1765where1766_T: Send,1767_D: wasmtime::component::HasData,1768{1769let callee = unsafe {1770wasmtime::component::TypedFunc::<1771(),1772(wasmtime::component::__internal::Vec<i8>,),1773>::new_unchecked(self.list_s8_ret)1774};1775let (ret0,) = callee.call_concurrent(accessor, ()).await?;1776Ok(ret0)1777}1778pub async fn call_list_s16_ret<_T, _D>(1779&self,1780accessor: &wasmtime::component::Accessor<_T, _D>,1781) -> wasmtime::Result<wasmtime::component::__internal::Vec<i16>>1782where1783_T: Send,1784_D: wasmtime::component::HasData,1785{1786let callee = unsafe {1787wasmtime::component::TypedFunc::<1788(),1789(wasmtime::component::__internal::Vec<i16>,),1790>::new_unchecked(self.list_s16_ret)1791};1792let (ret0,) = callee.call_concurrent(accessor, ()).await?;1793Ok(ret0)1794}1795pub async fn call_list_s32_ret<_T, _D>(1796&self,1797accessor: &wasmtime::component::Accessor<_T, _D>,1798) -> wasmtime::Result<wasmtime::component::__internal::Vec<i32>>1799where1800_T: Send,1801_D: wasmtime::component::HasData,1802{1803let callee = unsafe {1804wasmtime::component::TypedFunc::<1805(),1806(wasmtime::component::__internal::Vec<i32>,),1807>::new_unchecked(self.list_s32_ret)1808};1809let (ret0,) = callee.call_concurrent(accessor, ()).await?;1810Ok(ret0)1811}1812pub async fn call_list_s64_ret<_T, _D>(1813&self,1814accessor: &wasmtime::component::Accessor<_T, _D>,1815) -> wasmtime::Result<wasmtime::component::__internal::Vec<i64>>1816where1817_T: Send,1818_D: wasmtime::component::HasData,1819{1820let callee = unsafe {1821wasmtime::component::TypedFunc::<1822(),1823(wasmtime::component::__internal::Vec<i64>,),1824>::new_unchecked(self.list_s64_ret)1825};1826let (ret0,) = callee.call_concurrent(accessor, ()).await?;1827Ok(ret0)1828}1829pub async fn call_list_f32_ret<_T, _D>(1830&self,1831accessor: &wasmtime::component::Accessor<_T, _D>,1832) -> wasmtime::Result<wasmtime::component::__internal::Vec<f32>>1833where1834_T: Send,1835_D: wasmtime::component::HasData,1836{1837let callee = unsafe {1838wasmtime::component::TypedFunc::<1839(),1840(wasmtime::component::__internal::Vec<f32>,),1841>::new_unchecked(self.list_f32_ret)1842};1843let (ret0,) = callee.call_concurrent(accessor, ()).await?;1844Ok(ret0)1845}1846pub async fn call_list_f64_ret<_T, _D>(1847&self,1848accessor: &wasmtime::component::Accessor<_T, _D>,1849) -> wasmtime::Result<wasmtime::component::__internal::Vec<f64>>1850where1851_T: Send,1852_D: wasmtime::component::HasData,1853{1854let callee = unsafe {1855wasmtime::component::TypedFunc::<1856(),1857(wasmtime::component::__internal::Vec<f64>,),1858>::new_unchecked(self.list_f64_ret)1859};1860let (ret0,) = callee.call_concurrent(accessor, ()).await?;1861Ok(ret0)1862}1863pub async fn call_tuple_list<_T, _D>(1864&self,1865accessor: &wasmtime::component::Accessor<_T, _D>,1866arg0: wasmtime::component::__internal::Vec<(u8, i8)>,1867) -> wasmtime::Result<1868wasmtime::component::__internal::Vec<(i64, u32)>,1869>1870where1871_T: Send,1872_D: wasmtime::component::HasData,1873{1874let callee = unsafe {1875wasmtime::component::TypedFunc::<1876(wasmtime::component::__internal::Vec<(u8, i8)>,),1877(wasmtime::component::__internal::Vec<(i64, u32)>,),1878>::new_unchecked(self.tuple_list)1879};1880let (ret0,) = callee.call_concurrent(accessor, (arg0,)).await?;1881Ok(ret0)1882}1883pub async fn call_string_list_arg<_T, _D>(1884&self,1885accessor: &wasmtime::component::Accessor<_T, _D>,1886arg0: wasmtime::component::__internal::Vec<1887wasmtime::component::__internal::String,1888>,1889) -> wasmtime::Result<()>1890where1891_T: Send,1892_D: wasmtime::component::HasData,1893{1894let callee = unsafe {1895wasmtime::component::TypedFunc::<1896(1897wasmtime::component::__internal::Vec<1898wasmtime::component::__internal::String,1899>,1900),1901(),1902>::new_unchecked(self.string_list_arg)1903};1904let () = callee.call_concurrent(accessor, (arg0,)).await?;1905Ok(())1906}1907pub async fn call_string_list_ret<_T, _D>(1908&self,1909accessor: &wasmtime::component::Accessor<_T, _D>,1910) -> wasmtime::Result<1911wasmtime::component::__internal::Vec<1912wasmtime::component::__internal::String,1913>,1914>1915where1916_T: Send,1917_D: wasmtime::component::HasData,1918{1919let callee = unsafe {1920wasmtime::component::TypedFunc::<1921(),1922(1923wasmtime::component::__internal::Vec<1924wasmtime::component::__internal::String,1925>,1926),1927>::new_unchecked(self.string_list_ret)1928};1929let (ret0,) = callee.call_concurrent(accessor, ()).await?;1930Ok(ret0)1931}1932pub async fn call_tuple_string_list<_T, _D>(1933&self,1934accessor: &wasmtime::component::Accessor<_T, _D>,1935arg0: wasmtime::component::__internal::Vec<1936(u8, wasmtime::component::__internal::String),1937>,1938) -> wasmtime::Result<1939wasmtime::component::__internal::Vec<1940(wasmtime::component::__internal::String, u8),1941>,1942>1943where1944_T: Send,1945_D: wasmtime::component::HasData,1946{1947let callee = unsafe {1948wasmtime::component::TypedFunc::<1949(1950wasmtime::component::__internal::Vec<1951(u8, wasmtime::component::__internal::String),1952>,1953),1954(1955wasmtime::component::__internal::Vec<1956(wasmtime::component::__internal::String, u8),1957>,1958),1959>::new_unchecked(self.tuple_string_list)1960};1961let (ret0,) = callee.call_concurrent(accessor, (arg0,)).await?;1962Ok(ret0)1963}1964pub async fn call_string_list<_T, _D>(1965&self,1966accessor: &wasmtime::component::Accessor<_T, _D>,1967arg0: wasmtime::component::__internal::Vec<1968wasmtime::component::__internal::String,1969>,1970) -> wasmtime::Result<1971wasmtime::component::__internal::Vec<1972wasmtime::component::__internal::String,1973>,1974>1975where1976_T: Send,1977_D: wasmtime::component::HasData,1978{1979let callee = unsafe {1980wasmtime::component::TypedFunc::<1981(1982wasmtime::component::__internal::Vec<1983wasmtime::component::__internal::String,1984>,1985),1986(1987wasmtime::component::__internal::Vec<1988wasmtime::component::__internal::String,1989>,1990),1991>::new_unchecked(self.string_list)1992};1993let (ret0,) = callee.call_concurrent(accessor, (arg0,)).await?;1994Ok(ret0)1995}1996pub async fn call_record_list<_T, _D>(1997&self,1998accessor: &wasmtime::component::Accessor<_T, _D>,1999arg0: wasmtime::component::__internal::Vec<SomeRecord>,2000) -> wasmtime::Result<2001wasmtime::component::__internal::Vec<OtherRecord>,2002>2003where2004_T: Send,2005_D: wasmtime::component::HasData,2006{2007let callee = unsafe {2008wasmtime::component::TypedFunc::<2009(wasmtime::component::__internal::Vec<SomeRecord>,),2010(wasmtime::component::__internal::Vec<OtherRecord>,),2011>::new_unchecked(self.record_list)2012};2013let (ret0,) = callee.call_concurrent(accessor, (arg0,)).await?;2014Ok(ret0)2015}2016pub async fn call_record_list_reverse<_T, _D>(2017&self,2018accessor: &wasmtime::component::Accessor<_T, _D>,2019arg0: wasmtime::component::__internal::Vec<OtherRecord>,2020) -> wasmtime::Result<2021wasmtime::component::__internal::Vec<SomeRecord>,2022>2023where2024_T: Send,2025_D: wasmtime::component::HasData,2026{2027let callee = unsafe {2028wasmtime::component::TypedFunc::<2029(wasmtime::component::__internal::Vec<OtherRecord>,),2030(wasmtime::component::__internal::Vec<SomeRecord>,),2031>::new_unchecked(self.record_list_reverse)2032};2033let (ret0,) = callee.call_concurrent(accessor, (arg0,)).await?;2034Ok(ret0)2035}2036pub async fn call_variant_list<_T, _D>(2037&self,2038accessor: &wasmtime::component::Accessor<_T, _D>,2039arg0: wasmtime::component::__internal::Vec<SomeVariant>,2040) -> wasmtime::Result<2041wasmtime::component::__internal::Vec<OtherVariant>,2042>2043where2044_T: Send,2045_D: wasmtime::component::HasData,2046{2047let callee = unsafe {2048wasmtime::component::TypedFunc::<2049(wasmtime::component::__internal::Vec<SomeVariant>,),2050(wasmtime::component::__internal::Vec<OtherVariant>,),2051>::new_unchecked(self.variant_list)2052};2053let (ret0,) = callee.call_concurrent(accessor, (arg0,)).await?;2054Ok(ret0)2055}2056pub async fn call_load_store_everything<_T, _D>(2057&self,2058accessor: &wasmtime::component::Accessor<_T, _D>,2059arg0: LoadStoreAllSizes,2060) -> wasmtime::Result<LoadStoreAllSizes>2061where2062_T: Send,2063_D: wasmtime::component::HasData,2064{2065let callee = unsafe {2066wasmtime::component::TypedFunc::<2067(LoadStoreAllSizes,),2068(LoadStoreAllSizes,),2069>::new_unchecked(self.load_store_everything)2070};2071let (ret0,) = callee.call_concurrent(accessor, (arg0,)).await?;2072Ok(ret0)2073}2074}2075}2076}2077}2078}207920802081