// Generated by `wit-bindgen` 0.41.0. DO NOT EDIT! // Options used: // * runtime_path: "wit_bindgen_rt" #[rustfmt::skip] #[allow(dead_code, clippy::all)] pub mod exports { pub mod ringlet { pub mod pwc317_t2_frings { #[allow(dead_code, async_fn_in_trait, unused_imports, clippy::all)] pub mod frings { #[used] #[doc(hidden)] static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_frings_cabi( arg0: *mut u8, arg1: usize, arg2: *mut u8, arg3: usize, ) -> i32 { #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); let len0 = arg1; let bytes0 = _rt::Vec::from_raw_parts(arg0.cast(), len0, len0); let len1 = arg3; let bytes1 = _rt::Vec::from_raw_parts(arg2.cast(), len1, len1); let result2 = T::frings( _rt::string_lift(bytes0), _rt::string_lift(bytes1), ); match result2 { true => 1, false => 0, } } pub trait Guest { fn frings(str1: _rt::String, str2: _rt::String) -> bool; } #[doc(hidden)] macro_rules! __export_ringlet_pwc317_t2_frings_frings_0_1_0_cabi { ($ty:ident with_types_in $($path_to_types:tt)*) => { const _ : () = { #[unsafe (export_name = "ringlet:pwc317-t2-frings/frings@0.1.0#frings")] unsafe extern "C" fn export_frings(arg0 : * mut u8, arg1 : usize, arg2 : * mut u8, arg3 : usize,) -> i32 { unsafe { $($path_to_types)*:: _export_frings_cabi::<$ty > (arg0, arg1, arg2, arg3) } } }; }; } #[doc(hidden)] pub(crate) use __export_ringlet_pwc317_t2_frings_frings_0_1_0_cabi; } } } } #[rustfmt::skip] mod _rt { #![allow(dead_code, clippy::all)] #[cfg(target_arch = "wasm32")] pub fn run_ctors_once() { wit_bindgen_rt::run_ctors_once(); } pub use alloc_crate::vec::Vec; pub unsafe fn string_lift(bytes: Vec) -> String { if cfg!(debug_assertions) { String::from_utf8(bytes).unwrap() } else { String::from_utf8_unchecked(bytes) } } pub use alloc_crate::string::String; extern crate alloc as alloc_crate; } /// Generates `#[unsafe(no_mangle)]` functions to export the specified type as /// the root implementation of all generated traits. /// /// For more information see the documentation of `wit_bindgen::generate!`. /// /// ```rust /// # macro_rules! export{ ($($t:tt)*) => (); } /// # trait Guest {} /// struct MyType; /// /// impl Guest for MyType { /// // ... /// } /// /// export!(MyType); /// ``` #[allow(unused_macros)] #[doc(hidden)] macro_rules! __export_pwc317_t2_frings_impl { ($ty:ident) => { self::export!($ty with_types_in self); }; ($ty:ident with_types_in $($path_to_types_root:tt)*) => { $($path_to_types_root)*:: exports::ringlet::pwc317_t2_frings::frings::__export_ringlet_pwc317_t2_frings_frings_0_1_0_cabi!($ty with_types_in $($path_to_types_root)*:: exports::ringlet::pwc317_t2_frings::frings); }; } #[doc(inline)] pub(crate) use __export_pwc317_t2_frings_impl as export; #[cfg(target_arch = "wasm32")] #[unsafe( link_section = "component-type:wit-bindgen:0.41.0:ringlet:pwc317-t2-frings@0.1.0:pwc317-t2-frings:encoded world" )] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 266] = *b"\ \0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x83\x01\x01A\x02\x01\ A\x02\x01B\x02\x01@\x02\x04str1s\x04str2s\0\x7f\x04\0\x06frings\x01\0\x04\0%ring\ let:pwc317-t2-frings/frings@0.1.0\x05\0\x04\0/ringlet:pwc317-t2-frings/pwc317-t2\ -frings@0.1.0\x04\0\x0b\x16\x01\0\x10pwc317-t2-frings\x03\0\0\0G\x09producers\x01\ \x0cprocessed-by\x02\x0dwit-component\x070.227.1\x10wit-bindgen-rust\x060.41.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() { wit_bindgen_rt::maybe_link_cabi_realloc(); }