Path: blob/main/crates/component-macro/tests/expanded/lists_tracing_async.rs
3073 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 _: () = {105impl TheListsIndices {106/// Creates a new copy of `TheListsIndices` 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::lists::GuestIndices::new(_instance_pre)?;117Ok(TheListsIndices { interface0 })118}119/// Uses the indices stored in `self` to load an instance120/// of [`TheLists`] from the instance provided.121///122/// Note that at this time this method will additionally123/// perform type-checks of all exports.124pub fn load(125&self,126mut store: impl wasmtime::AsContextMut,127instance: &wasmtime::component::Instance,128) -> wasmtime::Result<TheLists> {129let _ = &mut store;130let _instance = instance;131let interface0 = self.interface0.load(&mut store, &_instance)?;132Ok(TheLists { interface0 })133}134}135impl TheLists {136/// Convenience wrapper around [`TheListsPre::new`] and137/// [`TheListsPre::instantiate`].138pub fn instantiate<_T>(139store: impl wasmtime::AsContextMut<Data = _T>,140component: &wasmtime::component::Component,141linker: &wasmtime::component::Linker<_T>,142) -> wasmtime::Result<TheLists> {143let pre = linker.instantiate_pre(component)?;144TheListsPre::new(pre)?.instantiate(store)145}146/// Convenience wrapper around [`TheListsIndices::new`] and147/// [`TheListsIndices::load`].148pub fn new(149mut store: impl wasmtime::AsContextMut,150instance: &wasmtime::component::Instance,151) -> wasmtime::Result<TheLists> {152let indices = TheListsIndices::new(&instance.instance_pre(&store))?;153indices.load(&mut store, instance)154}155/// Convenience wrapper around [`TheListsPre::new`] and156/// [`TheListsPre::instantiate_async`].157pub async fn instantiate_async<_T>(158store: impl wasmtime::AsContextMut<Data = _T>,159component: &wasmtime::component::Component,160linker: &wasmtime::component::Linker<_T>,161) -> wasmtime::Result<TheLists>162where163_T: Send,164{165let pre = linker.instantiate_pre(component)?;166TheListsPre::new(pre)?.instantiate_async(store).await167}168pub fn add_to_linker<T, D>(169linker: &mut wasmtime::component::Linker<T>,170host_getter: fn(&mut T) -> D::Data<'_>,171) -> wasmtime::Result<()>172where173D: foo::foo::lists::HostWithStore + Send,174for<'a> D::Data<'a>: foo::foo::lists::Host + Send,175T: 'static + Send,176{177foo::foo::lists::add_to_linker::<T, D>(linker, host_getter)?;178Ok(())179}180pub fn foo_foo_lists(&self) -> &exports::foo::foo::lists::Guest {181&self.interface0182}183}184};185pub mod foo {186pub mod foo {187#[allow(clippy::all)]188pub mod lists {189#[allow(unused_imports)]190use wasmtime::component::__internal::Box;191#[derive(wasmtime::component::ComponentType)]192#[derive(wasmtime::component::Lift)]193#[derive(wasmtime::component::Lower)]194#[component(record)]195#[derive(Clone)]196pub struct OtherRecord {197#[component(name = "a1")]198pub a1: u32,199#[component(name = "a2")]200pub a2: u64,201#[component(name = "a3")]202pub a3: i32,203#[component(name = "a4")]204pub a4: i64,205#[component(name = "b")]206pub b: wasmtime::component::__internal::String,207#[component(name = "c")]208pub c: wasmtime::component::__internal::Vec<u8>,209}210impl core::fmt::Debug for OtherRecord {211fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {212f.debug_struct("OtherRecord")213.field("a1", &self.a1)214.field("a2", &self.a2)215.field("a3", &self.a3)216.field("a4", &self.a4)217.field("b", &self.b)218.field("c", &self.c)219.finish()220}221}222const _: () = {223assert!(22448 == < OtherRecord as wasmtime::component::ComponentType >::SIZE32225);226assert!(2278 == < OtherRecord as wasmtime::component::ComponentType >::ALIGN32228);229};230#[derive(wasmtime::component::ComponentType)]231#[derive(wasmtime::component::Lift)]232#[derive(wasmtime::component::Lower)]233#[component(record)]234#[derive(Clone)]235pub struct SomeRecord {236#[component(name = "x")]237pub x: wasmtime::component::__internal::String,238#[component(name = "y")]239pub y: OtherRecord,240#[component(name = "z")]241pub z: wasmtime::component::__internal::Vec<OtherRecord>,242#[component(name = "c1")]243pub c1: u32,244#[component(name = "c2")]245pub c2: u64,246#[component(name = "c3")]247pub c3: i32,248#[component(name = "c4")]249pub c4: i64,250}251impl core::fmt::Debug for SomeRecord {252fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {253f.debug_struct("SomeRecord")254.field("x", &self.x)255.field("y", &self.y)256.field("z", &self.z)257.field("c1", &self.c1)258.field("c2", &self.c2)259.field("c3", &self.c3)260.field("c4", &self.c4)261.finish()262}263}264const _: () = {265assert!(26696 == < SomeRecord as wasmtime::component::ComponentType >::SIZE32267);268assert!(2698 == < SomeRecord as wasmtime::component::ComponentType >::ALIGN32270);271};272#[derive(wasmtime::component::ComponentType)]273#[derive(wasmtime::component::Lift)]274#[derive(wasmtime::component::Lower)]275#[component(variant)]276#[derive(Clone)]277pub enum OtherVariant {278#[component(name = "a")]279A,280#[component(name = "b")]281B(u32),282#[component(name = "c")]283C(wasmtime::component::__internal::String),284}285impl core::fmt::Debug for OtherVariant {286fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {287match self {288OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),289OtherVariant::B(e) => {290f.debug_tuple("OtherVariant::B").field(e).finish()291}292OtherVariant::C(e) => {293f.debug_tuple("OtherVariant::C").field(e).finish()294}295}296}297}298const _: () = {299assert!(30012 == < OtherVariant as wasmtime::component::ComponentType >::SIZE32301);302assert!(3034 == < OtherVariant as wasmtime::component::ComponentType >::ALIGN32304);305};306#[derive(wasmtime::component::ComponentType)]307#[derive(wasmtime::component::Lift)]308#[derive(wasmtime::component::Lower)]309#[component(variant)]310#[derive(Clone)]311pub enum SomeVariant {312#[component(name = "a")]313A(wasmtime::component::__internal::String),314#[component(name = "b")]315B,316#[component(name = "c")]317C(u32),318#[component(name = "d")]319D(wasmtime::component::__internal::Vec<OtherVariant>),320}321impl core::fmt::Debug for SomeVariant {322fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {323match self {324SomeVariant::A(e) => {325f.debug_tuple("SomeVariant::A").field(e).finish()326}327SomeVariant::B => f.debug_tuple("SomeVariant::B").finish(),328SomeVariant::C(e) => {329f.debug_tuple("SomeVariant::C").field(e).finish()330}331SomeVariant::D(e) => {332f.debug_tuple("SomeVariant::D").field(e).finish()333}334}335}336}337const _: () = {338assert!(33912 == < SomeVariant as wasmtime::component::ComponentType >::SIZE32340);341assert!(3424 == < SomeVariant as wasmtime::component::ComponentType >::ALIGN32343);344};345pub type LoadStoreAllSizes = wasmtime::component::__internal::Vec<346(347wasmtime::component::__internal::String,348u8,349i8,350u16,351i16,352u32,353i32,354u64,355i64,356f32,357f64,358char,359),360>;361const _: () = {362assert!(3638 == < LoadStoreAllSizes as wasmtime::component::ComponentType364>::SIZE32365);366assert!(3674 == < LoadStoreAllSizes as wasmtime::component::ComponentType368>::ALIGN32369);370};371pub trait HostWithStore: wasmtime::component::HasData + Send {}372impl<_T: ?Sized> HostWithStore for _T373where374_T: wasmtime::component::HasData + Send,375{}376pub trait Host: Send {377fn list_u8_param(378&mut self,379x: wasmtime::component::__internal::Vec<u8>,380) -> impl ::core::future::Future<Output = ()> + Send;381fn list_u16_param(382&mut self,383x: wasmtime::component::__internal::Vec<u16>,384) -> impl ::core::future::Future<Output = ()> + Send;385fn list_u32_param(386&mut self,387x: wasmtime::component::__internal::Vec<u32>,388) -> impl ::core::future::Future<Output = ()> + Send;389fn list_u64_param(390&mut self,391x: wasmtime::component::__internal::Vec<u64>,392) -> impl ::core::future::Future<Output = ()> + Send;393fn list_s8_param(394&mut self,395x: wasmtime::component::__internal::Vec<i8>,396) -> impl ::core::future::Future<Output = ()> + Send;397fn list_s16_param(398&mut self,399x: wasmtime::component::__internal::Vec<i16>,400) -> impl ::core::future::Future<Output = ()> + Send;401fn list_s32_param(402&mut self,403x: wasmtime::component::__internal::Vec<i32>,404) -> impl ::core::future::Future<Output = ()> + Send;405fn list_s64_param(406&mut self,407x: wasmtime::component::__internal::Vec<i64>,408) -> impl ::core::future::Future<Output = ()> + Send;409fn list_f32_param(410&mut self,411x: wasmtime::component::__internal::Vec<f32>,412) -> impl ::core::future::Future<Output = ()> + Send;413fn list_f64_param(414&mut self,415x: wasmtime::component::__internal::Vec<f64>,416) -> impl ::core::future::Future<Output = ()> + Send;417fn list_u8_ret(418&mut self,419) -> impl ::core::future::Future<420Output = wasmtime::component::__internal::Vec<u8>,421> + Send;422fn list_u16_ret(423&mut self,424) -> impl ::core::future::Future<425Output = wasmtime::component::__internal::Vec<u16>,426> + Send;427fn list_u32_ret(428&mut self,429) -> impl ::core::future::Future<430Output = wasmtime::component::__internal::Vec<u32>,431> + Send;432fn list_u64_ret(433&mut self,434) -> impl ::core::future::Future<435Output = wasmtime::component::__internal::Vec<u64>,436> + Send;437fn list_s8_ret(438&mut self,439) -> impl ::core::future::Future<440Output = wasmtime::component::__internal::Vec<i8>,441> + Send;442fn list_s16_ret(443&mut self,444) -> impl ::core::future::Future<445Output = wasmtime::component::__internal::Vec<i16>,446> + Send;447fn list_s32_ret(448&mut self,449) -> impl ::core::future::Future<450Output = wasmtime::component::__internal::Vec<i32>,451> + Send;452fn list_s64_ret(453&mut self,454) -> impl ::core::future::Future<455Output = wasmtime::component::__internal::Vec<i64>,456> + Send;457fn list_f32_ret(458&mut self,459) -> impl ::core::future::Future<460Output = wasmtime::component::__internal::Vec<f32>,461> + Send;462fn list_f64_ret(463&mut self,464) -> impl ::core::future::Future<465Output = wasmtime::component::__internal::Vec<f64>,466> + Send;467fn tuple_list(468&mut self,469x: wasmtime::component::__internal::Vec<(u8, i8)>,470) -> impl ::core::future::Future<471Output = wasmtime::component::__internal::Vec<(i64, u32)>,472> + Send;473fn string_list_arg(474&mut self,475a: wasmtime::component::__internal::Vec<476wasmtime::component::__internal::String,477>,478) -> impl ::core::future::Future<Output = ()> + Send;479fn string_list_ret(480&mut self,481) -> impl ::core::future::Future<482Output = wasmtime::component::__internal::Vec<483wasmtime::component::__internal::String,484>,485> + Send;486fn tuple_string_list(487&mut self,488x: wasmtime::component::__internal::Vec<489(u8, wasmtime::component::__internal::String),490>,491) -> impl ::core::future::Future<492Output = wasmtime::component::__internal::Vec<493(wasmtime::component::__internal::String, u8),494>,495> + Send;496fn string_list(497&mut self,498x: wasmtime::component::__internal::Vec<499wasmtime::component::__internal::String,500>,501) -> impl ::core::future::Future<502Output = wasmtime::component::__internal::Vec<503wasmtime::component::__internal::String,504>,505> + Send;506fn record_list(507&mut self,508x: wasmtime::component::__internal::Vec<SomeRecord>,509) -> impl ::core::future::Future<510Output = wasmtime::component::__internal::Vec<OtherRecord>,511> + Send;512fn record_list_reverse(513&mut self,514x: wasmtime::component::__internal::Vec<OtherRecord>,515) -> impl ::core::future::Future<516Output = wasmtime::component::__internal::Vec<SomeRecord>,517> + Send;518fn variant_list(519&mut self,520x: wasmtime::component::__internal::Vec<SomeVariant>,521) -> impl ::core::future::Future<522Output = wasmtime::component::__internal::Vec<OtherVariant>,523> + Send;524fn load_store_everything(525&mut self,526a: LoadStoreAllSizes,527) -> impl ::core::future::Future<Output = LoadStoreAllSizes> + Send;528}529impl<_T: Host + ?Sized + Send> Host for &mut _T {530fn list_u8_param(531&mut self,532x: wasmtime::component::__internal::Vec<u8>,533) -> impl ::core::future::Future<Output = ()> + Send {534async move { Host::list_u8_param(*self, x).await }535}536fn list_u16_param(537&mut self,538x: wasmtime::component::__internal::Vec<u16>,539) -> impl ::core::future::Future<Output = ()> + Send {540async move { Host::list_u16_param(*self, x).await }541}542fn list_u32_param(543&mut self,544x: wasmtime::component::__internal::Vec<u32>,545) -> impl ::core::future::Future<Output = ()> + Send {546async move { Host::list_u32_param(*self, x).await }547}548fn list_u64_param(549&mut self,550x: wasmtime::component::__internal::Vec<u64>,551) -> impl ::core::future::Future<Output = ()> + Send {552async move { Host::list_u64_param(*self, x).await }553}554fn list_s8_param(555&mut self,556x: wasmtime::component::__internal::Vec<i8>,557) -> impl ::core::future::Future<Output = ()> + Send {558async move { Host::list_s8_param(*self, x).await }559}560fn list_s16_param(561&mut self,562x: wasmtime::component::__internal::Vec<i16>,563) -> impl ::core::future::Future<Output = ()> + Send {564async move { Host::list_s16_param(*self, x).await }565}566fn list_s32_param(567&mut self,568x: wasmtime::component::__internal::Vec<i32>,569) -> impl ::core::future::Future<Output = ()> + Send {570async move { Host::list_s32_param(*self, x).await }571}572fn list_s64_param(573&mut self,574x: wasmtime::component::__internal::Vec<i64>,575) -> impl ::core::future::Future<Output = ()> + Send {576async move { Host::list_s64_param(*self, x).await }577}578fn list_f32_param(579&mut self,580x: wasmtime::component::__internal::Vec<f32>,581) -> impl ::core::future::Future<Output = ()> + Send {582async move { Host::list_f32_param(*self, x).await }583}584fn list_f64_param(585&mut self,586x: wasmtime::component::__internal::Vec<f64>,587) -> impl ::core::future::Future<Output = ()> + Send {588async move { Host::list_f64_param(*self, x).await }589}590fn list_u8_ret(591&mut self,592) -> impl ::core::future::Future<593Output = wasmtime::component::__internal::Vec<u8>,594> + Send {595async move { Host::list_u8_ret(*self).await }596}597fn list_u16_ret(598&mut self,599) -> impl ::core::future::Future<600Output = wasmtime::component::__internal::Vec<u16>,601> + Send {602async move { Host::list_u16_ret(*self).await }603}604fn list_u32_ret(605&mut self,606) -> impl ::core::future::Future<607Output = wasmtime::component::__internal::Vec<u32>,608> + Send {609async move { Host::list_u32_ret(*self).await }610}611fn list_u64_ret(612&mut self,613) -> impl ::core::future::Future<614Output = wasmtime::component::__internal::Vec<u64>,615> + Send {616async move { Host::list_u64_ret(*self).await }617}618fn list_s8_ret(619&mut self,620) -> impl ::core::future::Future<621Output = wasmtime::component::__internal::Vec<i8>,622> + Send {623async move { Host::list_s8_ret(*self).await }624}625fn list_s16_ret(626&mut self,627) -> impl ::core::future::Future<628Output = wasmtime::component::__internal::Vec<i16>,629> + Send {630async move { Host::list_s16_ret(*self).await }631}632fn list_s32_ret(633&mut self,634) -> impl ::core::future::Future<635Output = wasmtime::component::__internal::Vec<i32>,636> + Send {637async move { Host::list_s32_ret(*self).await }638}639fn list_s64_ret(640&mut self,641) -> impl ::core::future::Future<642Output = wasmtime::component::__internal::Vec<i64>,643> + Send {644async move { Host::list_s64_ret(*self).await }645}646fn list_f32_ret(647&mut self,648) -> impl ::core::future::Future<649Output = wasmtime::component::__internal::Vec<f32>,650> + Send {651async move { Host::list_f32_ret(*self).await }652}653fn list_f64_ret(654&mut self,655) -> impl ::core::future::Future<656Output = wasmtime::component::__internal::Vec<f64>,657> + Send {658async move { Host::list_f64_ret(*self).await }659}660fn tuple_list(661&mut self,662x: wasmtime::component::__internal::Vec<(u8, i8)>,663) -> impl ::core::future::Future<664Output = wasmtime::component::__internal::Vec<(i64, u32)>,665> + Send {666async move { Host::tuple_list(*self, x).await }667}668fn string_list_arg(669&mut self,670a: wasmtime::component::__internal::Vec<671wasmtime::component::__internal::String,672>,673) -> impl ::core::future::Future<Output = ()> + Send {674async move { Host::string_list_arg(*self, a).await }675}676fn string_list_ret(677&mut self,678) -> impl ::core::future::Future<679Output = wasmtime::component::__internal::Vec<680wasmtime::component::__internal::String,681>,682> + Send {683async move { Host::string_list_ret(*self).await }684}685fn tuple_string_list(686&mut self,687x: wasmtime::component::__internal::Vec<688(u8, wasmtime::component::__internal::String),689>,690) -> impl ::core::future::Future<691Output = wasmtime::component::__internal::Vec<692(wasmtime::component::__internal::String, u8),693>,694> + Send {695async move { Host::tuple_string_list(*self, x).await }696}697fn string_list(698&mut self,699x: wasmtime::component::__internal::Vec<700wasmtime::component::__internal::String,701>,702) -> impl ::core::future::Future<703Output = wasmtime::component::__internal::Vec<704wasmtime::component::__internal::String,705>,706> + Send {707async move { Host::string_list(*self, x).await }708}709fn record_list(710&mut self,711x: wasmtime::component::__internal::Vec<SomeRecord>,712) -> impl ::core::future::Future<713Output = wasmtime::component::__internal::Vec<OtherRecord>,714> + Send {715async move { Host::record_list(*self, x).await }716}717fn record_list_reverse(718&mut self,719x: wasmtime::component::__internal::Vec<OtherRecord>,720) -> impl ::core::future::Future<721Output = wasmtime::component::__internal::Vec<SomeRecord>,722> + Send {723async move { Host::record_list_reverse(*self, x).await }724}725fn variant_list(726&mut self,727x: wasmtime::component::__internal::Vec<SomeVariant>,728) -> impl ::core::future::Future<729Output = wasmtime::component::__internal::Vec<OtherVariant>,730> + Send {731async move { Host::variant_list(*self, x).await }732}733fn load_store_everything(734&mut self,735a: LoadStoreAllSizes,736) -> impl ::core::future::Future<Output = LoadStoreAllSizes> + Send {737async move { Host::load_store_everything(*self, a).await }738}739}740pub fn add_to_linker<T, D>(741linker: &mut wasmtime::component::Linker<T>,742host_getter: fn(&mut T) -> D::Data<'_>,743) -> wasmtime::Result<()>744where745D: HostWithStore,746for<'a> D::Data<'a>: Host,747T: 'static + Send,748{749let mut inst = linker.instance("foo:foo/lists")?;750inst.func_wrap_async(751"list-u8-param",752move |753mut caller: wasmtime::StoreContextMut<'_, T>,754(arg0,): (wasmtime::component::__internal::Vec<u8>,)|755{756use tracing::Instrument;757let span = tracing::span!(758tracing::Level::TRACE, "wit-bindgen import", module =759"lists", function = "list-u8-param",760);761wasmtime::component::__internal::Box::new(762async move {763tracing::event!(764tracing::Level::TRACE, x = tracing::field::debug("..."),765"call"766);767let host = &mut host_getter(caller.data_mut());768let r = Host::list_u8_param(host, arg0).await;769tracing::event!(770tracing::Level::TRACE, result = tracing::field::debug(& r),771"return"772);773Ok(r)774}775.instrument(span),776)777},778)?;779inst.func_wrap_async(780"list-u16-param",781move |782mut caller: wasmtime::StoreContextMut<'_, T>,783(arg0,): (wasmtime::component::__internal::Vec<u16>,)|784{785use tracing::Instrument;786let span = tracing::span!(787tracing::Level::TRACE, "wit-bindgen import", module =788"lists", function = "list-u16-param",789);790wasmtime::component::__internal::Box::new(791async move {792tracing::event!(793tracing::Level::TRACE, x = tracing::field::debug("..."),794"call"795);796let host = &mut host_getter(caller.data_mut());797let r = Host::list_u16_param(host, arg0).await;798tracing::event!(799tracing::Level::TRACE, result = tracing::field::debug(& r),800"return"801);802Ok(r)803}804.instrument(span),805)806},807)?;808inst.func_wrap_async(809"list-u32-param",810move |811mut caller: wasmtime::StoreContextMut<'_, T>,812(arg0,): (wasmtime::component::__internal::Vec<u32>,)|813{814use tracing::Instrument;815let span = tracing::span!(816tracing::Level::TRACE, "wit-bindgen import", module =817"lists", function = "list-u32-param",818);819wasmtime::component::__internal::Box::new(820async move {821tracing::event!(822tracing::Level::TRACE, x = tracing::field::debug("..."),823"call"824);825let host = &mut host_getter(caller.data_mut());826let r = Host::list_u32_param(host, arg0).await;827tracing::event!(828tracing::Level::TRACE, result = tracing::field::debug(& r),829"return"830);831Ok(r)832}833.instrument(span),834)835},836)?;837inst.func_wrap_async(838"list-u64-param",839move |840mut caller: wasmtime::StoreContextMut<'_, T>,841(arg0,): (wasmtime::component::__internal::Vec<u64>,)|842{843use tracing::Instrument;844let span = tracing::span!(845tracing::Level::TRACE, "wit-bindgen import", module =846"lists", function = "list-u64-param",847);848wasmtime::component::__internal::Box::new(849async move {850tracing::event!(851tracing::Level::TRACE, x = tracing::field::debug("..."),852"call"853);854let host = &mut host_getter(caller.data_mut());855let r = Host::list_u64_param(host, arg0).await;856tracing::event!(857tracing::Level::TRACE, result = tracing::field::debug(& r),858"return"859);860Ok(r)861}862.instrument(span),863)864},865)?;866inst.func_wrap_async(867"list-s8-param",868move |869mut caller: wasmtime::StoreContextMut<'_, T>,870(arg0,): (wasmtime::component::__internal::Vec<i8>,)|871{872use tracing::Instrument;873let span = tracing::span!(874tracing::Level::TRACE, "wit-bindgen import", module =875"lists", function = "list-s8-param",876);877wasmtime::component::__internal::Box::new(878async move {879tracing::event!(880tracing::Level::TRACE, x = tracing::field::debug("..."),881"call"882);883let host = &mut host_getter(caller.data_mut());884let r = Host::list_s8_param(host, arg0).await;885tracing::event!(886tracing::Level::TRACE, result = tracing::field::debug(& r),887"return"888);889Ok(r)890}891.instrument(span),892)893},894)?;895inst.func_wrap_async(896"list-s16-param",897move |898mut caller: wasmtime::StoreContextMut<'_, T>,899(arg0,): (wasmtime::component::__internal::Vec<i16>,)|900{901use tracing::Instrument;902let span = tracing::span!(903tracing::Level::TRACE, "wit-bindgen import", module =904"lists", function = "list-s16-param",905);906wasmtime::component::__internal::Box::new(907async move {908tracing::event!(909tracing::Level::TRACE, x = tracing::field::debug("..."),910"call"911);912let host = &mut host_getter(caller.data_mut());913let r = Host::list_s16_param(host, arg0).await;914tracing::event!(915tracing::Level::TRACE, result = tracing::field::debug(& r),916"return"917);918Ok(r)919}920.instrument(span),921)922},923)?;924inst.func_wrap_async(925"list-s32-param",926move |927mut caller: wasmtime::StoreContextMut<'_, T>,928(arg0,): (wasmtime::component::__internal::Vec<i32>,)|929{930use tracing::Instrument;931let span = tracing::span!(932tracing::Level::TRACE, "wit-bindgen import", module =933"lists", function = "list-s32-param",934);935wasmtime::component::__internal::Box::new(936async move {937tracing::event!(938tracing::Level::TRACE, x = tracing::field::debug("..."),939"call"940);941let host = &mut host_getter(caller.data_mut());942let r = Host::list_s32_param(host, arg0).await;943tracing::event!(944tracing::Level::TRACE, result = tracing::field::debug(& r),945"return"946);947Ok(r)948}949.instrument(span),950)951},952)?;953inst.func_wrap_async(954"list-s64-param",955move |956mut caller: wasmtime::StoreContextMut<'_, T>,957(arg0,): (wasmtime::component::__internal::Vec<i64>,)|958{959use tracing::Instrument;960let span = tracing::span!(961tracing::Level::TRACE, "wit-bindgen import", module =962"lists", function = "list-s64-param",963);964wasmtime::component::__internal::Box::new(965async move {966tracing::event!(967tracing::Level::TRACE, x = tracing::field::debug("..."),968"call"969);970let host = &mut host_getter(caller.data_mut());971let r = Host::list_s64_param(host, arg0).await;972tracing::event!(973tracing::Level::TRACE, result = tracing::field::debug(& r),974"return"975);976Ok(r)977}978.instrument(span),979)980},981)?;982inst.func_wrap_async(983"list-f32-param",984move |985mut caller: wasmtime::StoreContextMut<'_, T>,986(arg0,): (wasmtime::component::__internal::Vec<f32>,)|987{988use tracing::Instrument;989let span = tracing::span!(990tracing::Level::TRACE, "wit-bindgen import", module =991"lists", function = "list-f32-param",992);993wasmtime::component::__internal::Box::new(994async move {995tracing::event!(996tracing::Level::TRACE, x = tracing::field::debug("..."),997"call"998);999let host = &mut host_getter(caller.data_mut());1000let r = Host::list_f32_param(host, arg0).await;1001tracing::event!(1002tracing::Level::TRACE, result = tracing::field::debug(& r),1003"return"1004);1005Ok(r)1006}1007.instrument(span),1008)1009},1010)?;1011inst.func_wrap_async(1012"list-f64-param",1013move |1014mut caller: wasmtime::StoreContextMut<'_, T>,1015(arg0,): (wasmtime::component::__internal::Vec<f64>,)|1016{1017use tracing::Instrument;1018let span = tracing::span!(1019tracing::Level::TRACE, "wit-bindgen import", module =1020"lists", function = "list-f64-param",1021);1022wasmtime::component::__internal::Box::new(1023async move {1024tracing::event!(1025tracing::Level::TRACE, x = tracing::field::debug("..."),1026"call"1027);1028let host = &mut host_getter(caller.data_mut());1029let r = Host::list_f64_param(host, arg0).await;1030tracing::event!(1031tracing::Level::TRACE, result = tracing::field::debug(& r),1032"return"1033);1034Ok(r)1035}1036.instrument(span),1037)1038},1039)?;1040inst.func_wrap_async(1041"list-u8-ret",1042move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1043use tracing::Instrument;1044let span = tracing::span!(1045tracing::Level::TRACE, "wit-bindgen import", module =1046"lists", function = "list-u8-ret",1047);1048wasmtime::component::__internal::Box::new(1049async move {1050tracing::event!(tracing::Level::TRACE, "call");1051let host = &mut host_getter(caller.data_mut());1052let r = Host::list_u8_ret(host).await;1053tracing::event!(1054tracing::Level::TRACE, result =1055tracing::field::debug("..."), "return"1056);1057Ok((r,))1058}1059.instrument(span),1060)1061},1062)?;1063inst.func_wrap_async(1064"list-u16-ret",1065move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1066use tracing::Instrument;1067let span = tracing::span!(1068tracing::Level::TRACE, "wit-bindgen import", module =1069"lists", function = "list-u16-ret",1070);1071wasmtime::component::__internal::Box::new(1072async move {1073tracing::event!(tracing::Level::TRACE, "call");1074let host = &mut host_getter(caller.data_mut());1075let r = Host::list_u16_ret(host).await;1076tracing::event!(1077tracing::Level::TRACE, result =1078tracing::field::debug("..."), "return"1079);1080Ok((r,))1081}1082.instrument(span),1083)1084},1085)?;1086inst.func_wrap_async(1087"list-u32-ret",1088move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1089use tracing::Instrument;1090let span = tracing::span!(1091tracing::Level::TRACE, "wit-bindgen import", module =1092"lists", function = "list-u32-ret",1093);1094wasmtime::component::__internal::Box::new(1095async move {1096tracing::event!(tracing::Level::TRACE, "call");1097let host = &mut host_getter(caller.data_mut());1098let r = Host::list_u32_ret(host).await;1099tracing::event!(1100tracing::Level::TRACE, result =1101tracing::field::debug("..."), "return"1102);1103Ok((r,))1104}1105.instrument(span),1106)1107},1108)?;1109inst.func_wrap_async(1110"list-u64-ret",1111move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1112use tracing::Instrument;1113let span = tracing::span!(1114tracing::Level::TRACE, "wit-bindgen import", module =1115"lists", function = "list-u64-ret",1116);1117wasmtime::component::__internal::Box::new(1118async move {1119tracing::event!(tracing::Level::TRACE, "call");1120let host = &mut host_getter(caller.data_mut());1121let r = Host::list_u64_ret(host).await;1122tracing::event!(1123tracing::Level::TRACE, result =1124tracing::field::debug("..."), "return"1125);1126Ok((r,))1127}1128.instrument(span),1129)1130},1131)?;1132inst.func_wrap_async(1133"list-s8-ret",1134move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1135use tracing::Instrument;1136let span = tracing::span!(1137tracing::Level::TRACE, "wit-bindgen import", module =1138"lists", function = "list-s8-ret",1139);1140wasmtime::component::__internal::Box::new(1141async move {1142tracing::event!(tracing::Level::TRACE, "call");1143let host = &mut host_getter(caller.data_mut());1144let r = Host::list_s8_ret(host).await;1145tracing::event!(1146tracing::Level::TRACE, result =1147tracing::field::debug("..."), "return"1148);1149Ok((r,))1150}1151.instrument(span),1152)1153},1154)?;1155inst.func_wrap_async(1156"list-s16-ret",1157move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1158use tracing::Instrument;1159let span = tracing::span!(1160tracing::Level::TRACE, "wit-bindgen import", module =1161"lists", function = "list-s16-ret",1162);1163wasmtime::component::__internal::Box::new(1164async move {1165tracing::event!(tracing::Level::TRACE, "call");1166let host = &mut host_getter(caller.data_mut());1167let r = Host::list_s16_ret(host).await;1168tracing::event!(1169tracing::Level::TRACE, result =1170tracing::field::debug("..."), "return"1171);1172Ok((r,))1173}1174.instrument(span),1175)1176},1177)?;1178inst.func_wrap_async(1179"list-s32-ret",1180move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1181use tracing::Instrument;1182let span = tracing::span!(1183tracing::Level::TRACE, "wit-bindgen import", module =1184"lists", function = "list-s32-ret",1185);1186wasmtime::component::__internal::Box::new(1187async move {1188tracing::event!(tracing::Level::TRACE, "call");1189let host = &mut host_getter(caller.data_mut());1190let r = Host::list_s32_ret(host).await;1191tracing::event!(1192tracing::Level::TRACE, result =1193tracing::field::debug("..."), "return"1194);1195Ok((r,))1196}1197.instrument(span),1198)1199},1200)?;1201inst.func_wrap_async(1202"list-s64-ret",1203move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1204use tracing::Instrument;1205let span = tracing::span!(1206tracing::Level::TRACE, "wit-bindgen import", module =1207"lists", function = "list-s64-ret",1208);1209wasmtime::component::__internal::Box::new(1210async move {1211tracing::event!(tracing::Level::TRACE, "call");1212let host = &mut host_getter(caller.data_mut());1213let r = Host::list_s64_ret(host).await;1214tracing::event!(1215tracing::Level::TRACE, result =1216tracing::field::debug("..."), "return"1217);1218Ok((r,))1219}1220.instrument(span),1221)1222},1223)?;1224inst.func_wrap_async(1225"list-f32-ret",1226move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1227use tracing::Instrument;1228let span = tracing::span!(1229tracing::Level::TRACE, "wit-bindgen import", module =1230"lists", function = "list-f32-ret",1231);1232wasmtime::component::__internal::Box::new(1233async move {1234tracing::event!(tracing::Level::TRACE, "call");1235let host = &mut host_getter(caller.data_mut());1236let r = Host::list_f32_ret(host).await;1237tracing::event!(1238tracing::Level::TRACE, result =1239tracing::field::debug("..."), "return"1240);1241Ok((r,))1242}1243.instrument(span),1244)1245},1246)?;1247inst.func_wrap_async(1248"list-f64-ret",1249move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1250use tracing::Instrument;1251let span = tracing::span!(1252tracing::Level::TRACE, "wit-bindgen import", module =1253"lists", function = "list-f64-ret",1254);1255wasmtime::component::__internal::Box::new(1256async move {1257tracing::event!(tracing::Level::TRACE, "call");1258let host = &mut host_getter(caller.data_mut());1259let r = Host::list_f64_ret(host).await;1260tracing::event!(1261tracing::Level::TRACE, result =1262tracing::field::debug("..."), "return"1263);1264Ok((r,))1265}1266.instrument(span),1267)1268},1269)?;1270inst.func_wrap_async(1271"tuple-list",1272move |1273mut caller: wasmtime::StoreContextMut<'_, T>,1274(arg0,): (wasmtime::component::__internal::Vec<(u8, i8)>,)|1275{1276use tracing::Instrument;1277let span = tracing::span!(1278tracing::Level::TRACE, "wit-bindgen import", module =1279"lists", function = "tuple-list",1280);1281wasmtime::component::__internal::Box::new(1282async move {1283tracing::event!(1284tracing::Level::TRACE, x = tracing::field::debug("..."),1285"call"1286);1287let host = &mut host_getter(caller.data_mut());1288let r = Host::tuple_list(host, arg0).await;1289tracing::event!(1290tracing::Level::TRACE, result =1291tracing::field::debug("..."), "return"1292);1293Ok((r,))1294}1295.instrument(span),1296)1297},1298)?;1299inst.func_wrap_async(1300"string-list-arg",1301move |1302mut caller: wasmtime::StoreContextMut<'_, T>,1303(1304arg0,1305): (1306wasmtime::component::__internal::Vec<1307wasmtime::component::__internal::String,1308>,1309)|1310{1311use tracing::Instrument;1312let span = tracing::span!(1313tracing::Level::TRACE, "wit-bindgen import", module =1314"lists", function = "string-list-arg",1315);1316wasmtime::component::__internal::Box::new(1317async move {1318tracing::event!(1319tracing::Level::TRACE, a = tracing::field::debug("..."),1320"call"1321);1322let host = &mut host_getter(caller.data_mut());1323let r = Host::string_list_arg(host, arg0).await;1324tracing::event!(1325tracing::Level::TRACE, result = tracing::field::debug(& r),1326"return"1327);1328Ok(r)1329}1330.instrument(span),1331)1332},1333)?;1334inst.func_wrap_async(1335"string-list-ret",1336move |mut caller: wasmtime::StoreContextMut<'_, T>, (): ()| {1337use tracing::Instrument;1338let span = tracing::span!(1339tracing::Level::TRACE, "wit-bindgen import", module =1340"lists", function = "string-list-ret",1341);1342wasmtime::component::__internal::Box::new(1343async move {1344tracing::event!(tracing::Level::TRACE, "call");1345let host = &mut host_getter(caller.data_mut());1346let r = Host::string_list_ret(host).await;1347tracing::event!(1348tracing::Level::TRACE, result =1349tracing::field::debug("..."), "return"1350);1351Ok((r,))1352}1353.instrument(span),1354)1355},1356)?;1357inst.func_wrap_async(1358"tuple-string-list",1359move |1360mut caller: wasmtime::StoreContextMut<'_, T>,1361(1362arg0,1363): (1364wasmtime::component::__internal::Vec<1365(u8, wasmtime::component::__internal::String),1366>,1367)|1368{1369use tracing::Instrument;1370let span = tracing::span!(1371tracing::Level::TRACE, "wit-bindgen import", module =1372"lists", function = "tuple-string-list",1373);1374wasmtime::component::__internal::Box::new(1375async move {1376tracing::event!(1377tracing::Level::TRACE, x = tracing::field::debug("..."),1378"call"1379);1380let host = &mut host_getter(caller.data_mut());1381let r = Host::tuple_string_list(host, arg0).await;1382tracing::event!(1383tracing::Level::TRACE, result =1384tracing::field::debug("..."), "return"1385);1386Ok((r,))1387}1388.instrument(span),1389)1390},1391)?;1392inst.func_wrap_async(1393"string-list",1394move |1395mut caller: wasmtime::StoreContextMut<'_, T>,1396(1397arg0,1398): (1399wasmtime::component::__internal::Vec<1400wasmtime::component::__internal::String,1401>,1402)|1403{1404use tracing::Instrument;1405let span = tracing::span!(1406tracing::Level::TRACE, "wit-bindgen import", module =1407"lists", function = "string-list",1408);1409wasmtime::component::__internal::Box::new(1410async move {1411tracing::event!(1412tracing::Level::TRACE, x = tracing::field::debug("..."),1413"call"1414);1415let host = &mut host_getter(caller.data_mut());1416let r = Host::string_list(host, arg0).await;1417tracing::event!(1418tracing::Level::TRACE, result =1419tracing::field::debug("..."), "return"1420);1421Ok((r,))1422}1423.instrument(span),1424)1425},1426)?;1427inst.func_wrap_async(1428"record-list",1429move |1430mut caller: wasmtime::StoreContextMut<'_, T>,1431(arg0,): (wasmtime::component::__internal::Vec<SomeRecord>,)|1432{1433use tracing::Instrument;1434let span = tracing::span!(1435tracing::Level::TRACE, "wit-bindgen import", module =1436"lists", function = "record-list",1437);1438wasmtime::component::__internal::Box::new(1439async move {1440tracing::event!(1441tracing::Level::TRACE, x = tracing::field::debug("..."),1442"call"1443);1444let host = &mut host_getter(caller.data_mut());1445let r = Host::record_list(host, arg0).await;1446tracing::event!(1447tracing::Level::TRACE, result =1448tracing::field::debug("..."), "return"1449);1450Ok((r,))1451}1452.instrument(span),1453)1454},1455)?;1456inst.func_wrap_async(1457"record-list-reverse",1458move |1459mut caller: wasmtime::StoreContextMut<'_, T>,1460(arg0,): (wasmtime::component::__internal::Vec<OtherRecord>,)|1461{1462use tracing::Instrument;1463let span = tracing::span!(1464tracing::Level::TRACE, "wit-bindgen import", module =1465"lists", function = "record-list-reverse",1466);1467wasmtime::component::__internal::Box::new(1468async move {1469tracing::event!(1470tracing::Level::TRACE, x = tracing::field::debug("..."),1471"call"1472);1473let host = &mut host_getter(caller.data_mut());1474let r = Host::record_list_reverse(host, arg0).await;1475tracing::event!(1476tracing::Level::TRACE, result =1477tracing::field::debug("..."), "return"1478);1479Ok((r,))1480}1481.instrument(span),1482)1483},1484)?;1485inst.func_wrap_async(1486"variant-list",1487move |1488mut caller: wasmtime::StoreContextMut<'_, T>,1489(arg0,): (wasmtime::component::__internal::Vec<SomeVariant>,)|1490{1491use tracing::Instrument;1492let span = tracing::span!(1493tracing::Level::TRACE, "wit-bindgen import", module =1494"lists", function = "variant-list",1495);1496wasmtime::component::__internal::Box::new(1497async move {1498tracing::event!(1499tracing::Level::TRACE, x = tracing::field::debug("..."),1500"call"1501);1502let host = &mut host_getter(caller.data_mut());1503let r = Host::variant_list(host, arg0).await;1504tracing::event!(1505tracing::Level::TRACE, result =1506tracing::field::debug("..."), "return"1507);1508Ok((r,))1509}1510.instrument(span),1511)1512},1513)?;1514inst.func_wrap_async(1515"load-store-everything",1516move |1517mut caller: wasmtime::StoreContextMut<'_, T>,1518(arg0,): (LoadStoreAllSizes,)|1519{1520use tracing::Instrument;1521let span = tracing::span!(1522tracing::Level::TRACE, "wit-bindgen import", module =1523"lists", function = "load-store-everything",1524);1525wasmtime::component::__internal::Box::new(1526async move {1527tracing::event!(1528tracing::Level::TRACE, a = tracing::field::debug("..."),1529"call"1530);1531let host = &mut host_getter(caller.data_mut());1532let r = Host::load_store_everything(host, arg0).await;1533tracing::event!(1534tracing::Level::TRACE, result =1535tracing::field::debug("..."), "return"1536);1537Ok((r,))1538}1539.instrument(span),1540)1541},1542)?;1543Ok(())1544}1545}1546}1547}1548pub mod exports {1549pub mod foo {1550pub mod foo {1551#[allow(clippy::all)]1552pub mod lists {1553#[allow(unused_imports)]1554use wasmtime::component::__internal::Box;1555#[derive(wasmtime::component::ComponentType)]1556#[derive(wasmtime::component::Lift)]1557#[derive(wasmtime::component::Lower)]1558#[component(record)]1559#[derive(Clone)]1560pub struct OtherRecord {1561#[component(name = "a1")]1562pub a1: u32,1563#[component(name = "a2")]1564pub a2: u64,1565#[component(name = "a3")]1566pub a3: i32,1567#[component(name = "a4")]1568pub a4: i64,1569#[component(name = "b")]1570pub b: wasmtime::component::__internal::String,1571#[component(name = "c")]1572pub c: wasmtime::component::__internal::Vec<u8>,1573}1574impl core::fmt::Debug for OtherRecord {1575fn fmt(1576&self,1577f: &mut core::fmt::Formatter<'_>,1578) -> core::fmt::Result {1579f.debug_struct("OtherRecord")1580.field("a1", &self.a1)1581.field("a2", &self.a2)1582.field("a3", &self.a3)1583.field("a4", &self.a4)1584.field("b", &self.b)1585.field("c", &self.c)1586.finish()1587}1588}1589const _: () = {1590assert!(159148 == < OtherRecord as wasmtime::component::ComponentType1592>::SIZE321593);1594assert!(15958 == < OtherRecord as wasmtime::component::ComponentType1596>::ALIGN321597);1598};1599#[derive(wasmtime::component::ComponentType)]1600#[derive(wasmtime::component::Lift)]1601#[derive(wasmtime::component::Lower)]1602#[component(record)]1603#[derive(Clone)]1604pub struct SomeRecord {1605#[component(name = "x")]1606pub x: wasmtime::component::__internal::String,1607#[component(name = "y")]1608pub y: OtherRecord,1609#[component(name = "z")]1610pub z: wasmtime::component::__internal::Vec<OtherRecord>,1611#[component(name = "c1")]1612pub c1: u32,1613#[component(name = "c2")]1614pub c2: u64,1615#[component(name = "c3")]1616pub c3: i32,1617#[component(name = "c4")]1618pub c4: i64,1619}1620impl core::fmt::Debug for SomeRecord {1621fn fmt(1622&self,1623f: &mut core::fmt::Formatter<'_>,1624) -> core::fmt::Result {1625f.debug_struct("SomeRecord")1626.field("x", &self.x)1627.field("y", &self.y)1628.field("z", &self.z)1629.field("c1", &self.c1)1630.field("c2", &self.c2)1631.field("c3", &self.c3)1632.field("c4", &self.c4)1633.finish()1634}1635}1636const _: () = {1637assert!(163896 == < SomeRecord as wasmtime::component::ComponentType1639>::SIZE321640);1641assert!(16428 == < SomeRecord as wasmtime::component::ComponentType1643>::ALIGN321644);1645};1646#[derive(wasmtime::component::ComponentType)]1647#[derive(wasmtime::component::Lift)]1648#[derive(wasmtime::component::Lower)]1649#[component(variant)]1650#[derive(Clone)]1651pub enum OtherVariant {1652#[component(name = "a")]1653A,1654#[component(name = "b")]1655B(u32),1656#[component(name = "c")]1657C(wasmtime::component::__internal::String),1658}1659impl core::fmt::Debug for OtherVariant {1660fn fmt(1661&self,1662f: &mut core::fmt::Formatter<'_>,1663) -> core::fmt::Result {1664match self {1665OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),1666OtherVariant::B(e) => {1667f.debug_tuple("OtherVariant::B").field(e).finish()1668}1669OtherVariant::C(e) => {1670f.debug_tuple("OtherVariant::C").field(e).finish()1671}1672}1673}1674}1675const _: () = {1676assert!(167712 == < OtherVariant as wasmtime::component::ComponentType1678>::SIZE321679);1680assert!(16814 == < OtherVariant as wasmtime::component::ComponentType1682>::ALIGN321683);1684};1685#[derive(wasmtime::component::ComponentType)]1686#[derive(wasmtime::component::Lift)]1687#[derive(wasmtime::component::Lower)]1688#[component(variant)]1689#[derive(Clone)]1690pub enum SomeVariant {1691#[component(name = "a")]1692A(wasmtime::component::__internal::String),1693#[component(name = "b")]1694B,1695#[component(name = "c")]1696C(u32),1697#[component(name = "d")]1698D(wasmtime::component::__internal::Vec<OtherVariant>),1699}1700impl core::fmt::Debug for SomeVariant {1701fn fmt(1702&self,1703f: &mut core::fmt::Formatter<'_>,1704) -> core::fmt::Result {1705match self {1706SomeVariant::A(e) => {1707f.debug_tuple("SomeVariant::A").field(e).finish()1708}1709SomeVariant::B => f.debug_tuple("SomeVariant::B").finish(),1710SomeVariant::C(e) => {1711f.debug_tuple("SomeVariant::C").field(e).finish()1712}1713SomeVariant::D(e) => {1714f.debug_tuple("SomeVariant::D").field(e).finish()1715}1716}1717}1718}1719const _: () = {1720assert!(172112 == < SomeVariant as wasmtime::component::ComponentType1722>::SIZE321723);1724assert!(17254 == < SomeVariant as wasmtime::component::ComponentType1726>::ALIGN321727);1728};1729pub type LoadStoreAllSizes = wasmtime::component::__internal::Vec<1730(1731wasmtime::component::__internal::String,1732u8,1733i8,1734u16,1735i16,1736u32,1737i32,1738u64,1739i64,1740f32,1741f64,1742char,1743),1744>;1745const _: () = {1746assert!(17478 == < LoadStoreAllSizes as wasmtime::component::ComponentType1748>::SIZE321749);1750assert!(17514 == < LoadStoreAllSizes as wasmtime::component::ComponentType1752>::ALIGN321753);1754};1755#[derive(Clone)]1756pub struct Guest {1757list_u8_param: wasmtime::component::Func,1758list_u16_param: wasmtime::component::Func,1759list_u32_param: wasmtime::component::Func,1760list_u64_param: wasmtime::component::Func,1761list_s8_param: wasmtime::component::Func,1762list_s16_param: wasmtime::component::Func,1763list_s32_param: wasmtime::component::Func,1764list_s64_param: wasmtime::component::Func,1765list_f32_param: wasmtime::component::Func,1766list_f64_param: wasmtime::component::Func,1767list_u8_ret: wasmtime::component::Func,1768list_u16_ret: wasmtime::component::Func,1769list_u32_ret: wasmtime::component::Func,1770list_u64_ret: wasmtime::component::Func,1771list_s8_ret: wasmtime::component::Func,1772list_s16_ret: wasmtime::component::Func,1773list_s32_ret: wasmtime::component::Func,1774list_s64_ret: wasmtime::component::Func,1775list_f32_ret: wasmtime::component::Func,1776list_f64_ret: wasmtime::component::Func,1777tuple_list: wasmtime::component::Func,1778string_list_arg: wasmtime::component::Func,1779string_list_ret: wasmtime::component::Func,1780tuple_string_list: wasmtime::component::Func,1781string_list: wasmtime::component::Func,1782record_list: wasmtime::component::Func,1783record_list_reverse: wasmtime::component::Func,1784variant_list: wasmtime::component::Func,1785load_store_everything: wasmtime::component::Func,1786}1787#[derive(Clone)]1788pub struct GuestIndices {1789list_u8_param: wasmtime::component::ComponentExportIndex,1790list_u16_param: wasmtime::component::ComponentExportIndex,1791list_u32_param: wasmtime::component::ComponentExportIndex,1792list_u64_param: wasmtime::component::ComponentExportIndex,1793list_s8_param: wasmtime::component::ComponentExportIndex,1794list_s16_param: wasmtime::component::ComponentExportIndex,1795list_s32_param: wasmtime::component::ComponentExportIndex,1796list_s64_param: wasmtime::component::ComponentExportIndex,1797list_f32_param: wasmtime::component::ComponentExportIndex,1798list_f64_param: wasmtime::component::ComponentExportIndex,1799list_u8_ret: wasmtime::component::ComponentExportIndex,1800list_u16_ret: wasmtime::component::ComponentExportIndex,1801list_u32_ret: wasmtime::component::ComponentExportIndex,1802list_u64_ret: wasmtime::component::ComponentExportIndex,1803list_s8_ret: wasmtime::component::ComponentExportIndex,1804list_s16_ret: wasmtime::component::ComponentExportIndex,1805list_s32_ret: wasmtime::component::ComponentExportIndex,1806list_s64_ret: wasmtime::component::ComponentExportIndex,1807list_f32_ret: wasmtime::component::ComponentExportIndex,1808list_f64_ret: wasmtime::component::ComponentExportIndex,1809tuple_list: wasmtime::component::ComponentExportIndex,1810string_list_arg: wasmtime::component::ComponentExportIndex,1811string_list_ret: wasmtime::component::ComponentExportIndex,1812tuple_string_list: wasmtime::component::ComponentExportIndex,1813string_list: wasmtime::component::ComponentExportIndex,1814record_list: wasmtime::component::ComponentExportIndex,1815record_list_reverse: wasmtime::component::ComponentExportIndex,1816variant_list: wasmtime::component::ComponentExportIndex,1817load_store_everything: wasmtime::component::ComponentExportIndex,1818}1819impl GuestIndices {1820/// Constructor for [`GuestIndices`] which takes a1821/// [`Component`](wasmtime::component::Component) as input and can be executed1822/// before instantiation.1823///1824/// This constructor can be used to front-load string lookups to find exports1825/// within a component.1826pub fn new<_T>(1827_instance_pre: &wasmtime::component::InstancePre<_T>,1828) -> wasmtime::Result<GuestIndices> {1829let instance = _instance_pre1830.component()1831.get_export_index(None, "foo:foo/lists")1832.ok_or_else(|| {1833wasmtime::format_err!(1834"no exported instance named `foo:foo/lists`"1835)1836})?;1837let mut lookup = move |name| {1838_instance_pre1839.component()1840.get_export_index(Some(&instance), name)1841.ok_or_else(|| {1842wasmtime::format_err!(1843"instance export `foo:foo/lists` does \1844not have export `{name}`"1845)1846})1847};1848let _ = &mut lookup;1849let list_u8_param = lookup("list-u8-param")?;1850let list_u16_param = lookup("list-u16-param")?;1851let list_u32_param = lookup("list-u32-param")?;1852let list_u64_param = lookup("list-u64-param")?;1853let list_s8_param = lookup("list-s8-param")?;1854let list_s16_param = lookup("list-s16-param")?;1855let list_s32_param = lookup("list-s32-param")?;1856let list_s64_param = lookup("list-s64-param")?;1857let list_f32_param = lookup("list-f32-param")?;1858let list_f64_param = lookup("list-f64-param")?;1859let list_u8_ret = lookup("list-u8-ret")?;1860let list_u16_ret = lookup("list-u16-ret")?;1861let list_u32_ret = lookup("list-u32-ret")?;1862let list_u64_ret = lookup("list-u64-ret")?;1863let list_s8_ret = lookup("list-s8-ret")?;1864let list_s16_ret = lookup("list-s16-ret")?;1865let list_s32_ret = lookup("list-s32-ret")?;1866let list_s64_ret = lookup("list-s64-ret")?;1867let list_f32_ret = lookup("list-f32-ret")?;1868let list_f64_ret = lookup("list-f64-ret")?;1869let tuple_list = lookup("tuple-list")?;1870let string_list_arg = lookup("string-list-arg")?;1871let string_list_ret = lookup("string-list-ret")?;1872let tuple_string_list = lookup("tuple-string-list")?;1873let string_list = lookup("string-list")?;1874let record_list = lookup("record-list")?;1875let record_list_reverse = lookup("record-list-reverse")?;1876let variant_list = lookup("variant-list")?;1877let load_store_everything = lookup("load-store-everything")?;1878Ok(GuestIndices {1879list_u8_param,1880list_u16_param,1881list_u32_param,1882list_u64_param,1883list_s8_param,1884list_s16_param,1885list_s32_param,1886list_s64_param,1887list_f32_param,1888list_f64_param,1889list_u8_ret,1890list_u16_ret,1891list_u32_ret,1892list_u64_ret,1893list_s8_ret,1894list_s16_ret,1895list_s32_ret,1896list_s64_ret,1897list_f32_ret,1898list_f64_ret,1899tuple_list,1900string_list_arg,1901string_list_ret,1902tuple_string_list,1903string_list,1904record_list,1905record_list_reverse,1906variant_list,1907load_store_everything,1908})1909}1910pub fn load(1911&self,1912mut store: impl wasmtime::AsContextMut,1913instance: &wasmtime::component::Instance,1914) -> wasmtime::Result<Guest> {1915let _instance = instance;1916let _instance_pre = _instance.instance_pre(&store);1917let _instance_type = _instance_pre.instance_type();1918let mut store = store.as_context_mut();1919let _ = &mut store;1920let list_u8_param = *_instance1921.get_typed_func::<1922(&[u8],),1923(),1924>(&mut store, &self.list_u8_param)?1925.func();1926let list_u16_param = *_instance1927.get_typed_func::<1928(&[u16],),1929(),1930>(&mut store, &self.list_u16_param)?1931.func();1932let list_u32_param = *_instance1933.get_typed_func::<1934(&[u32],),1935(),1936>(&mut store, &self.list_u32_param)?1937.func();1938let list_u64_param = *_instance1939.get_typed_func::<1940(&[u64],),1941(),1942>(&mut store, &self.list_u64_param)?1943.func();1944let list_s8_param = *_instance1945.get_typed_func::<1946(&[i8],),1947(),1948>(&mut store, &self.list_s8_param)?1949.func();1950let list_s16_param = *_instance1951.get_typed_func::<1952(&[i16],),1953(),1954>(&mut store, &self.list_s16_param)?1955.func();1956let list_s32_param = *_instance1957.get_typed_func::<1958(&[i32],),1959(),1960>(&mut store, &self.list_s32_param)?1961.func();1962let list_s64_param = *_instance1963.get_typed_func::<1964(&[i64],),1965(),1966>(&mut store, &self.list_s64_param)?1967.func();1968let list_f32_param = *_instance1969.get_typed_func::<1970(&[f32],),1971(),1972>(&mut store, &self.list_f32_param)?1973.func();1974let list_f64_param = *_instance1975.get_typed_func::<1976(&[f64],),1977(),1978>(&mut store, &self.list_f64_param)?1979.func();1980let list_u8_ret = *_instance1981.get_typed_func::<1982(),1983(wasmtime::component::__internal::Vec<u8>,),1984>(&mut store, &self.list_u8_ret)?1985.func();1986let list_u16_ret = *_instance1987.get_typed_func::<1988(),1989(wasmtime::component::__internal::Vec<u16>,),1990>(&mut store, &self.list_u16_ret)?1991.func();1992let list_u32_ret = *_instance1993.get_typed_func::<1994(),1995(wasmtime::component::__internal::Vec<u32>,),1996>(&mut store, &self.list_u32_ret)?1997.func();1998let list_u64_ret = *_instance1999.get_typed_func::<2000(),2001(wasmtime::component::__internal::Vec<u64>,),2002>(&mut store, &self.list_u64_ret)?2003.func();2004let list_s8_ret = *_instance2005.get_typed_func::<2006(),2007(wasmtime::component::__internal::Vec<i8>,),2008>(&mut store, &self.list_s8_ret)?2009.func();2010let list_s16_ret = *_instance2011.get_typed_func::<2012(),2013(wasmtime::component::__internal::Vec<i16>,),2014>(&mut store, &self.list_s16_ret)?2015.func();2016let list_s32_ret = *_instance2017.get_typed_func::<2018(),2019(wasmtime::component::__internal::Vec<i32>,),2020>(&mut store, &self.list_s32_ret)?2021.func();2022let list_s64_ret = *_instance2023.get_typed_func::<2024(),2025(wasmtime::component::__internal::Vec<i64>,),2026>(&mut store, &self.list_s64_ret)?2027.func();2028let list_f32_ret = *_instance2029.get_typed_func::<2030(),2031(wasmtime::component::__internal::Vec<f32>,),2032>(&mut store, &self.list_f32_ret)?2033.func();2034let list_f64_ret = *_instance2035.get_typed_func::<2036(),2037(wasmtime::component::__internal::Vec<f64>,),2038>(&mut store, &self.list_f64_ret)?2039.func();2040let tuple_list = *_instance2041.get_typed_func::<2042(&[(u8, i8)],),2043(wasmtime::component::__internal::Vec<(i64, u32)>,),2044>(&mut store, &self.tuple_list)?2045.func();2046let string_list_arg = *_instance2047.get_typed_func::<2048(&[wasmtime::component::__internal::String],),2049(),2050>(&mut store, &self.string_list_arg)?2051.func();2052let string_list_ret = *_instance2053.get_typed_func::<2054(),2055(2056wasmtime::component::__internal::Vec<2057wasmtime::component::__internal::String,2058>,2059),2060>(&mut store, &self.string_list_ret)?2061.func();2062let tuple_string_list = *_instance2063.get_typed_func::<2064(&[(u8, wasmtime::component::__internal::String)],),2065(2066wasmtime::component::__internal::Vec<2067(wasmtime::component::__internal::String, u8),2068>,2069),2070>(&mut store, &self.tuple_string_list)?2071.func();2072let string_list = *_instance2073.get_typed_func::<2074(&[wasmtime::component::__internal::String],),2075(2076wasmtime::component::__internal::Vec<2077wasmtime::component::__internal::String,2078>,2079),2080>(&mut store, &self.string_list)?2081.func();2082let record_list = *_instance2083.get_typed_func::<2084(&[SomeRecord],),2085(wasmtime::component::__internal::Vec<OtherRecord>,),2086>(&mut store, &self.record_list)?2087.func();2088let record_list_reverse = *_instance2089.get_typed_func::<2090(&[OtherRecord],),2091(wasmtime::component::__internal::Vec<SomeRecord>,),2092>(&mut store, &self.record_list_reverse)?2093.func();2094let variant_list = *_instance2095.get_typed_func::<2096(&[SomeVariant],),2097(wasmtime::component::__internal::Vec<OtherVariant>,),2098>(&mut store, &self.variant_list)?2099.func();2100let load_store_everything = *_instance2101.get_typed_func::<2102(&LoadStoreAllSizes,),2103(LoadStoreAllSizes,),2104>(&mut store, &self.load_store_everything)?2105.func();2106Ok(Guest {2107list_u8_param,2108list_u16_param,2109list_u32_param,2110list_u64_param,2111list_s8_param,2112list_s16_param,2113list_s32_param,2114list_s64_param,2115list_f32_param,2116list_f64_param,2117list_u8_ret,2118list_u16_ret,2119list_u32_ret,2120list_u64_ret,2121list_s8_ret,2122list_s16_ret,2123list_s32_ret,2124list_s64_ret,2125list_f32_ret,2126list_f64_ret,2127tuple_list,2128string_list_arg,2129string_list_ret,2130tuple_string_list,2131string_list,2132record_list,2133record_list_reverse,2134variant_list,2135load_store_everything,2136})2137}2138}2139impl Guest {2140pub async fn call_list_u8_param<S: wasmtime::AsContextMut>(2141&self,2142mut store: S,2143arg0: &[u8],2144) -> wasmtime::Result<()>2145where2146<S as wasmtime::AsContext>::Data: Send,2147{2148use tracing::Instrument;2149let span = tracing::span!(2150tracing::Level::TRACE, "wit-bindgen export", module =2151"foo:foo/lists", function = "list-u8-param",2152);2153let callee = unsafe {2154wasmtime::component::TypedFunc::<2155(&[u8],),2156(),2157>::new_unchecked(self.list_u8_param)2158};2159let () = callee2160.call_async(store.as_context_mut(), (arg0,))2161.instrument(span.clone())2162.await?;2163Ok(())2164}2165pub async fn call_list_u16_param<S: wasmtime::AsContextMut>(2166&self,2167mut store: S,2168arg0: &[u16],2169) -> wasmtime::Result<()>2170where2171<S as wasmtime::AsContext>::Data: Send,2172{2173use tracing::Instrument;2174let span = tracing::span!(2175tracing::Level::TRACE, "wit-bindgen export", module =2176"foo:foo/lists", function = "list-u16-param",2177);2178let callee = unsafe {2179wasmtime::component::TypedFunc::<2180(&[u16],),2181(),2182>::new_unchecked(self.list_u16_param)2183};2184let () = callee2185.call_async(store.as_context_mut(), (arg0,))2186.instrument(span.clone())2187.await?;2188Ok(())2189}2190pub async fn call_list_u32_param<S: wasmtime::AsContextMut>(2191&self,2192mut store: S,2193arg0: &[u32],2194) -> wasmtime::Result<()>2195where2196<S as wasmtime::AsContext>::Data: Send,2197{2198use tracing::Instrument;2199let span = tracing::span!(2200tracing::Level::TRACE, "wit-bindgen export", module =2201"foo:foo/lists", function = "list-u32-param",2202);2203let callee = unsafe {2204wasmtime::component::TypedFunc::<2205(&[u32],),2206(),2207>::new_unchecked(self.list_u32_param)2208};2209let () = callee2210.call_async(store.as_context_mut(), (arg0,))2211.instrument(span.clone())2212.await?;2213Ok(())2214}2215pub async fn call_list_u64_param<S: wasmtime::AsContextMut>(2216&self,2217mut store: S,2218arg0: &[u64],2219) -> wasmtime::Result<()>2220where2221<S as wasmtime::AsContext>::Data: Send,2222{2223use tracing::Instrument;2224let span = tracing::span!(2225tracing::Level::TRACE, "wit-bindgen export", module =2226"foo:foo/lists", function = "list-u64-param",2227);2228let callee = unsafe {2229wasmtime::component::TypedFunc::<2230(&[u64],),2231(),2232>::new_unchecked(self.list_u64_param)2233};2234let () = callee2235.call_async(store.as_context_mut(), (arg0,))2236.instrument(span.clone())2237.await?;2238Ok(())2239}2240pub async fn call_list_s8_param<S: wasmtime::AsContextMut>(2241&self,2242mut store: S,2243arg0: &[i8],2244) -> wasmtime::Result<()>2245where2246<S as wasmtime::AsContext>::Data: Send,2247{2248use tracing::Instrument;2249let span = tracing::span!(2250tracing::Level::TRACE, "wit-bindgen export", module =2251"foo:foo/lists", function = "list-s8-param",2252);2253let callee = unsafe {2254wasmtime::component::TypedFunc::<2255(&[i8],),2256(),2257>::new_unchecked(self.list_s8_param)2258};2259let () = callee2260.call_async(store.as_context_mut(), (arg0,))2261.instrument(span.clone())2262.await?;2263Ok(())2264}2265pub async fn call_list_s16_param<S: wasmtime::AsContextMut>(2266&self,2267mut store: S,2268arg0: &[i16],2269) -> wasmtime::Result<()>2270where2271<S as wasmtime::AsContext>::Data: Send,2272{2273use tracing::Instrument;2274let span = tracing::span!(2275tracing::Level::TRACE, "wit-bindgen export", module =2276"foo:foo/lists", function = "list-s16-param",2277);2278let callee = unsafe {2279wasmtime::component::TypedFunc::<2280(&[i16],),2281(),2282>::new_unchecked(self.list_s16_param)2283};2284let () = callee2285.call_async(store.as_context_mut(), (arg0,))2286.instrument(span.clone())2287.await?;2288Ok(())2289}2290pub async fn call_list_s32_param<S: wasmtime::AsContextMut>(2291&self,2292mut store: S,2293arg0: &[i32],2294) -> wasmtime::Result<()>2295where2296<S as wasmtime::AsContext>::Data: Send,2297{2298use tracing::Instrument;2299let span = tracing::span!(2300tracing::Level::TRACE, "wit-bindgen export", module =2301"foo:foo/lists", function = "list-s32-param",2302);2303let callee = unsafe {2304wasmtime::component::TypedFunc::<2305(&[i32],),2306(),2307>::new_unchecked(self.list_s32_param)2308};2309let () = callee2310.call_async(store.as_context_mut(), (arg0,))2311.instrument(span.clone())2312.await?;2313Ok(())2314}2315pub async fn call_list_s64_param<S: wasmtime::AsContextMut>(2316&self,2317mut store: S,2318arg0: &[i64],2319) -> wasmtime::Result<()>2320where2321<S as wasmtime::AsContext>::Data: Send,2322{2323use tracing::Instrument;2324let span = tracing::span!(2325tracing::Level::TRACE, "wit-bindgen export", module =2326"foo:foo/lists", function = "list-s64-param",2327);2328let callee = unsafe {2329wasmtime::component::TypedFunc::<2330(&[i64],),2331(),2332>::new_unchecked(self.list_s64_param)2333};2334let () = callee2335.call_async(store.as_context_mut(), (arg0,))2336.instrument(span.clone())2337.await?;2338Ok(())2339}2340pub async fn call_list_f32_param<S: wasmtime::AsContextMut>(2341&self,2342mut store: S,2343arg0: &[f32],2344) -> wasmtime::Result<()>2345where2346<S as wasmtime::AsContext>::Data: Send,2347{2348use tracing::Instrument;2349let span = tracing::span!(2350tracing::Level::TRACE, "wit-bindgen export", module =2351"foo:foo/lists", function = "list-f32-param",2352);2353let callee = unsafe {2354wasmtime::component::TypedFunc::<2355(&[f32],),2356(),2357>::new_unchecked(self.list_f32_param)2358};2359let () = callee2360.call_async(store.as_context_mut(), (arg0,))2361.instrument(span.clone())2362.await?;2363Ok(())2364}2365pub async fn call_list_f64_param<S: wasmtime::AsContextMut>(2366&self,2367mut store: S,2368arg0: &[f64],2369) -> wasmtime::Result<()>2370where2371<S as wasmtime::AsContext>::Data: Send,2372{2373use tracing::Instrument;2374let span = tracing::span!(2375tracing::Level::TRACE, "wit-bindgen export", module =2376"foo:foo/lists", function = "list-f64-param",2377);2378let callee = unsafe {2379wasmtime::component::TypedFunc::<2380(&[f64],),2381(),2382>::new_unchecked(self.list_f64_param)2383};2384let () = callee2385.call_async(store.as_context_mut(), (arg0,))2386.instrument(span.clone())2387.await?;2388Ok(())2389}2390pub async fn call_list_u8_ret<S: wasmtime::AsContextMut>(2391&self,2392mut store: S,2393) -> wasmtime::Result<wasmtime::component::__internal::Vec<u8>>2394where2395<S as wasmtime::AsContext>::Data: Send,2396{2397use tracing::Instrument;2398let span = tracing::span!(2399tracing::Level::TRACE, "wit-bindgen export", module =2400"foo:foo/lists", function = "list-u8-ret",2401);2402let callee = unsafe {2403wasmtime::component::TypedFunc::<2404(),2405(wasmtime::component::__internal::Vec<u8>,),2406>::new_unchecked(self.list_u8_ret)2407};2408let (ret0,) = callee2409.call_async(store.as_context_mut(), ())2410.instrument(span.clone())2411.await?;2412Ok(ret0)2413}2414pub async fn call_list_u16_ret<S: wasmtime::AsContextMut>(2415&self,2416mut store: S,2417) -> wasmtime::Result<wasmtime::component::__internal::Vec<u16>>2418where2419<S as wasmtime::AsContext>::Data: Send,2420{2421use tracing::Instrument;2422let span = tracing::span!(2423tracing::Level::TRACE, "wit-bindgen export", module =2424"foo:foo/lists", function = "list-u16-ret",2425);2426let callee = unsafe {2427wasmtime::component::TypedFunc::<2428(),2429(wasmtime::component::__internal::Vec<u16>,),2430>::new_unchecked(self.list_u16_ret)2431};2432let (ret0,) = callee2433.call_async(store.as_context_mut(), ())2434.instrument(span.clone())2435.await?;2436Ok(ret0)2437}2438pub async fn call_list_u32_ret<S: wasmtime::AsContextMut>(2439&self,2440mut store: S,2441) -> wasmtime::Result<wasmtime::component::__internal::Vec<u32>>2442where2443<S as wasmtime::AsContext>::Data: Send,2444{2445use tracing::Instrument;2446let span = tracing::span!(2447tracing::Level::TRACE, "wit-bindgen export", module =2448"foo:foo/lists", function = "list-u32-ret",2449);2450let callee = unsafe {2451wasmtime::component::TypedFunc::<2452(),2453(wasmtime::component::__internal::Vec<u32>,),2454>::new_unchecked(self.list_u32_ret)2455};2456let (ret0,) = callee2457.call_async(store.as_context_mut(), ())2458.instrument(span.clone())2459.await?;2460Ok(ret0)2461}2462pub async fn call_list_u64_ret<S: wasmtime::AsContextMut>(2463&self,2464mut store: S,2465) -> wasmtime::Result<wasmtime::component::__internal::Vec<u64>>2466where2467<S as wasmtime::AsContext>::Data: Send,2468{2469use tracing::Instrument;2470let span = tracing::span!(2471tracing::Level::TRACE, "wit-bindgen export", module =2472"foo:foo/lists", function = "list-u64-ret",2473);2474let callee = unsafe {2475wasmtime::component::TypedFunc::<2476(),2477(wasmtime::component::__internal::Vec<u64>,),2478>::new_unchecked(self.list_u64_ret)2479};2480let (ret0,) = callee2481.call_async(store.as_context_mut(), ())2482.instrument(span.clone())2483.await?;2484Ok(ret0)2485}2486pub async fn call_list_s8_ret<S: wasmtime::AsContextMut>(2487&self,2488mut store: S,2489) -> wasmtime::Result<wasmtime::component::__internal::Vec<i8>>2490where2491<S as wasmtime::AsContext>::Data: Send,2492{2493use tracing::Instrument;2494let span = tracing::span!(2495tracing::Level::TRACE, "wit-bindgen export", module =2496"foo:foo/lists", function = "list-s8-ret",2497);2498let callee = unsafe {2499wasmtime::component::TypedFunc::<2500(),2501(wasmtime::component::__internal::Vec<i8>,),2502>::new_unchecked(self.list_s8_ret)2503};2504let (ret0,) = callee2505.call_async(store.as_context_mut(), ())2506.instrument(span.clone())2507.await?;2508Ok(ret0)2509}2510pub async fn call_list_s16_ret<S: wasmtime::AsContextMut>(2511&self,2512mut store: S,2513) -> wasmtime::Result<wasmtime::component::__internal::Vec<i16>>2514where2515<S as wasmtime::AsContext>::Data: Send,2516{2517use tracing::Instrument;2518let span = tracing::span!(2519tracing::Level::TRACE, "wit-bindgen export", module =2520"foo:foo/lists", function = "list-s16-ret",2521);2522let callee = unsafe {2523wasmtime::component::TypedFunc::<2524(),2525(wasmtime::component::__internal::Vec<i16>,),2526>::new_unchecked(self.list_s16_ret)2527};2528let (ret0,) = callee2529.call_async(store.as_context_mut(), ())2530.instrument(span.clone())2531.await?;2532Ok(ret0)2533}2534pub async fn call_list_s32_ret<S: wasmtime::AsContextMut>(2535&self,2536mut store: S,2537) -> wasmtime::Result<wasmtime::component::__internal::Vec<i32>>2538where2539<S as wasmtime::AsContext>::Data: Send,2540{2541use tracing::Instrument;2542let span = tracing::span!(2543tracing::Level::TRACE, "wit-bindgen export", module =2544"foo:foo/lists", function = "list-s32-ret",2545);2546let callee = unsafe {2547wasmtime::component::TypedFunc::<2548(),2549(wasmtime::component::__internal::Vec<i32>,),2550>::new_unchecked(self.list_s32_ret)2551};2552let (ret0,) = callee2553.call_async(store.as_context_mut(), ())2554.instrument(span.clone())2555.await?;2556Ok(ret0)2557}2558pub async fn call_list_s64_ret<S: wasmtime::AsContextMut>(2559&self,2560mut store: S,2561) -> wasmtime::Result<wasmtime::component::__internal::Vec<i64>>2562where2563<S as wasmtime::AsContext>::Data: Send,2564{2565use tracing::Instrument;2566let span = tracing::span!(2567tracing::Level::TRACE, "wit-bindgen export", module =2568"foo:foo/lists", function = "list-s64-ret",2569);2570let callee = unsafe {2571wasmtime::component::TypedFunc::<2572(),2573(wasmtime::component::__internal::Vec<i64>,),2574>::new_unchecked(self.list_s64_ret)2575};2576let (ret0,) = callee2577.call_async(store.as_context_mut(), ())2578.instrument(span.clone())2579.await?;2580Ok(ret0)2581}2582pub async fn call_list_f32_ret<S: wasmtime::AsContextMut>(2583&self,2584mut store: S,2585) -> wasmtime::Result<wasmtime::component::__internal::Vec<f32>>2586where2587<S as wasmtime::AsContext>::Data: Send,2588{2589use tracing::Instrument;2590let span = tracing::span!(2591tracing::Level::TRACE, "wit-bindgen export", module =2592"foo:foo/lists", function = "list-f32-ret",2593);2594let callee = unsafe {2595wasmtime::component::TypedFunc::<2596(),2597(wasmtime::component::__internal::Vec<f32>,),2598>::new_unchecked(self.list_f32_ret)2599};2600let (ret0,) = callee2601.call_async(store.as_context_mut(), ())2602.instrument(span.clone())2603.await?;2604Ok(ret0)2605}2606pub async fn call_list_f64_ret<S: wasmtime::AsContextMut>(2607&self,2608mut store: S,2609) -> wasmtime::Result<wasmtime::component::__internal::Vec<f64>>2610where2611<S as wasmtime::AsContext>::Data: Send,2612{2613use tracing::Instrument;2614let span = tracing::span!(2615tracing::Level::TRACE, "wit-bindgen export", module =2616"foo:foo/lists", function = "list-f64-ret",2617);2618let callee = unsafe {2619wasmtime::component::TypedFunc::<2620(),2621(wasmtime::component::__internal::Vec<f64>,),2622>::new_unchecked(self.list_f64_ret)2623};2624let (ret0,) = callee2625.call_async(store.as_context_mut(), ())2626.instrument(span.clone())2627.await?;2628Ok(ret0)2629}2630pub async fn call_tuple_list<S: wasmtime::AsContextMut>(2631&self,2632mut store: S,2633arg0: &[(u8, i8)],2634) -> wasmtime::Result<2635wasmtime::component::__internal::Vec<(i64, u32)>,2636>2637where2638<S as wasmtime::AsContext>::Data: Send,2639{2640use tracing::Instrument;2641let span = tracing::span!(2642tracing::Level::TRACE, "wit-bindgen export", module =2643"foo:foo/lists", function = "tuple-list",2644);2645let callee = unsafe {2646wasmtime::component::TypedFunc::<2647(&[(u8, i8)],),2648(wasmtime::component::__internal::Vec<(i64, u32)>,),2649>::new_unchecked(self.tuple_list)2650};2651let (ret0,) = callee2652.call_async(store.as_context_mut(), (arg0,))2653.instrument(span.clone())2654.await?;2655Ok(ret0)2656}2657pub async fn call_string_list_arg<S: wasmtime::AsContextMut>(2658&self,2659mut store: S,2660arg0: &[wasmtime::component::__internal::String],2661) -> wasmtime::Result<()>2662where2663<S as wasmtime::AsContext>::Data: Send,2664{2665use tracing::Instrument;2666let span = tracing::span!(2667tracing::Level::TRACE, "wit-bindgen export", module =2668"foo:foo/lists", function = "string-list-arg",2669);2670let callee = unsafe {2671wasmtime::component::TypedFunc::<2672(&[wasmtime::component::__internal::String],),2673(),2674>::new_unchecked(self.string_list_arg)2675};2676let () = callee2677.call_async(store.as_context_mut(), (arg0,))2678.instrument(span.clone())2679.await?;2680Ok(())2681}2682pub async fn call_string_list_ret<S: wasmtime::AsContextMut>(2683&self,2684mut store: S,2685) -> wasmtime::Result<2686wasmtime::component::__internal::Vec<2687wasmtime::component::__internal::String,2688>,2689>2690where2691<S as wasmtime::AsContext>::Data: Send,2692{2693use tracing::Instrument;2694let span = tracing::span!(2695tracing::Level::TRACE, "wit-bindgen export", module =2696"foo:foo/lists", function = "string-list-ret",2697);2698let callee = unsafe {2699wasmtime::component::TypedFunc::<2700(),2701(2702wasmtime::component::__internal::Vec<2703wasmtime::component::__internal::String,2704>,2705),2706>::new_unchecked(self.string_list_ret)2707};2708let (ret0,) = callee2709.call_async(store.as_context_mut(), ())2710.instrument(span.clone())2711.await?;2712Ok(ret0)2713}2714pub async fn call_tuple_string_list<S: wasmtime::AsContextMut>(2715&self,2716mut store: S,2717arg0: &[(u8, wasmtime::component::__internal::String)],2718) -> wasmtime::Result<2719wasmtime::component::__internal::Vec<2720(wasmtime::component::__internal::String, u8),2721>,2722>2723where2724<S as wasmtime::AsContext>::Data: Send,2725{2726use tracing::Instrument;2727let span = tracing::span!(2728tracing::Level::TRACE, "wit-bindgen export", module =2729"foo:foo/lists", function = "tuple-string-list",2730);2731let callee = unsafe {2732wasmtime::component::TypedFunc::<2733(&[(u8, wasmtime::component::__internal::String)],),2734(2735wasmtime::component::__internal::Vec<2736(wasmtime::component::__internal::String, u8),2737>,2738),2739>::new_unchecked(self.tuple_string_list)2740};2741let (ret0,) = callee2742.call_async(store.as_context_mut(), (arg0,))2743.instrument(span.clone())2744.await?;2745Ok(ret0)2746}2747pub async fn call_string_list<S: wasmtime::AsContextMut>(2748&self,2749mut store: S,2750arg0: &[wasmtime::component::__internal::String],2751) -> wasmtime::Result<2752wasmtime::component::__internal::Vec<2753wasmtime::component::__internal::String,2754>,2755>2756where2757<S as wasmtime::AsContext>::Data: Send,2758{2759use tracing::Instrument;2760let span = tracing::span!(2761tracing::Level::TRACE, "wit-bindgen export", module =2762"foo:foo/lists", function = "string-list",2763);2764let callee = unsafe {2765wasmtime::component::TypedFunc::<2766(&[wasmtime::component::__internal::String],),2767(2768wasmtime::component::__internal::Vec<2769wasmtime::component::__internal::String,2770>,2771),2772>::new_unchecked(self.string_list)2773};2774let (ret0,) = callee2775.call_async(store.as_context_mut(), (arg0,))2776.instrument(span.clone())2777.await?;2778Ok(ret0)2779}2780pub async fn call_record_list<S: wasmtime::AsContextMut>(2781&self,2782mut store: S,2783arg0: &[SomeRecord],2784) -> wasmtime::Result<2785wasmtime::component::__internal::Vec<OtherRecord>,2786>2787where2788<S as wasmtime::AsContext>::Data: Send,2789{2790use tracing::Instrument;2791let span = tracing::span!(2792tracing::Level::TRACE, "wit-bindgen export", module =2793"foo:foo/lists", function = "record-list",2794);2795let callee = unsafe {2796wasmtime::component::TypedFunc::<2797(&[SomeRecord],),2798(wasmtime::component::__internal::Vec<OtherRecord>,),2799>::new_unchecked(self.record_list)2800};2801let (ret0,) = callee2802.call_async(store.as_context_mut(), (arg0,))2803.instrument(span.clone())2804.await?;2805Ok(ret0)2806}2807pub async fn call_record_list_reverse<S: wasmtime::AsContextMut>(2808&self,2809mut store: S,2810arg0: &[OtherRecord],2811) -> wasmtime::Result<2812wasmtime::component::__internal::Vec<SomeRecord>,2813>2814where2815<S as wasmtime::AsContext>::Data: Send,2816{2817use tracing::Instrument;2818let span = tracing::span!(2819tracing::Level::TRACE, "wit-bindgen export", module =2820"foo:foo/lists", function = "record-list-reverse",2821);2822let callee = unsafe {2823wasmtime::component::TypedFunc::<2824(&[OtherRecord],),2825(wasmtime::component::__internal::Vec<SomeRecord>,),2826>::new_unchecked(self.record_list_reverse)2827};2828let (ret0,) = callee2829.call_async(store.as_context_mut(), (arg0,))2830.instrument(span.clone())2831.await?;2832Ok(ret0)2833}2834pub async fn call_variant_list<S: wasmtime::AsContextMut>(2835&self,2836mut store: S,2837arg0: &[SomeVariant],2838) -> wasmtime::Result<2839wasmtime::component::__internal::Vec<OtherVariant>,2840>2841where2842<S as wasmtime::AsContext>::Data: Send,2843{2844use tracing::Instrument;2845let span = tracing::span!(2846tracing::Level::TRACE, "wit-bindgen export", module =2847"foo:foo/lists", function = "variant-list",2848);2849let callee = unsafe {2850wasmtime::component::TypedFunc::<2851(&[SomeVariant],),2852(wasmtime::component::__internal::Vec<OtherVariant>,),2853>::new_unchecked(self.variant_list)2854};2855let (ret0,) = callee2856.call_async(store.as_context_mut(), (arg0,))2857.instrument(span.clone())2858.await?;2859Ok(ret0)2860}2861pub async fn call_load_store_everything<S: wasmtime::AsContextMut>(2862&self,2863mut store: S,2864arg0: &LoadStoreAllSizes,2865) -> wasmtime::Result<LoadStoreAllSizes>2866where2867<S as wasmtime::AsContext>::Data: Send,2868{2869use tracing::Instrument;2870let span = tracing::span!(2871tracing::Level::TRACE, "wit-bindgen export", module =2872"foo:foo/lists", function = "load-store-everything",2873);2874let callee = unsafe {2875wasmtime::component::TypedFunc::<2876(&LoadStoreAllSizes,),2877(LoadStoreAllSizes,),2878>::new_unchecked(self.load_store_everything)2879};2880let (ret0,) = callee2881.call_async(store.as_context_mut(), (arg0,))2882.instrument(span.clone())2883.await?;2884Ok(ret0)2885}2886}2887}2888}2889}2890}289128922893