33// * runtime_path: "wit_bindgen_rt"
44#[ rustfmt:: skip]
55#[ allow( dead_code, clippy:: all) ]
6- pub mod wasi_sample {
6+ pub mod component_sample {
77 pub mod example {
88 #[ allow( dead_code, async_fn_in_trait, unused_imports, clippy:: all) ]
99 pub mod host {
@@ -18,7 +18,7 @@ pub mod wasi_sample {
1818 let ptr0 = vec0. as_ptr ( ) . cast :: < u8 > ( ) ;
1919 let len0 = vec0. len ( ) ;
2020 #[ cfg( target_arch = "wasm32" ) ]
21- #[ link( wasm_import_module = "wasi -sample:example/host" ) ]
21+ #[ link( wasm_import_module = "component -sample:example/host" ) ]
2222 unsafe extern "C" {
2323 #[ link_name = "print" ]
2424 fn wit_import1 ( _: * mut u8 , _: usize ) ;
@@ -49,7 +49,7 @@ pub mod wasi_sample {
4949 let len0 = vec0. len ( ) ;
5050 let ptr1 = ret_area. 0 . as_mut_ptr ( ) . cast :: < u8 > ( ) ;
5151 #[ cfg( target_arch = "wasm32" ) ]
52- #[ link( wasm_import_module = "wasi -sample:example/host" ) ]
52+ #[ link( wasm_import_module = "component -sample:example/host" ) ]
5353 unsafe extern "C" {
5454 #[ link_name = "host-function" ]
5555 fn wit_import2 ( _: * mut u8 , _: usize , _: * mut u8 ) ;
@@ -75,7 +75,7 @@ pub mod wasi_sample {
7575#[ rustfmt:: skip]
7676#[ allow( dead_code, clippy:: all) ]
7777pub mod exports {
78- pub mod wasi_sample {
78+ pub mod component_sample {
7979 pub mod example {
8080 #[ allow( dead_code, async_fn_in_trait, unused_imports, clippy:: all) ]
8181 pub mod adder {
@@ -130,27 +130,29 @@ pub mod exports {
130130 fn do_something ( number : u32 ) -> ( ) ;
131131 }
132132 #[ doc( hidden) ]
133- macro_rules! __export_wasi_sample_example_adder_cabi {
133+ macro_rules! __export_component_sample_example_adder_cabi {
134134 ( $ty: ident with_types_in $( $path_to_types: tt) * ) => {
135135 const _ : ( ) = { #[ unsafe ( export_name =
136- "wasi -sample:example/adder#add" ) ] unsafe extern "C" fn
136+ "component -sample:example/adder#add" ) ] unsafe extern "C" fn
137137 export_add( arg0 : i32 , arg1 : i32 , ) -> i32 { unsafe {
138138 $( $path_to_types) * :: _export_add_cabi:: <$ty > ( arg0, arg1) } }
139- #[ unsafe ( export_name = "wasi-sample:example/adder#call-host" ) ]
140- unsafe extern "C" fn export_call_host( arg0 : * mut u8 , arg1 :
141- usize , ) -> * mut u8 { unsafe { $( $path_to_types) * ::
142- _export_call_host_cabi:: <$ty > ( arg0, arg1) } } #[ unsafe
143- ( export_name = "cabi_post_wasi-sample:example/adder#call-host" ) ]
144- unsafe extern "C" fn _post_return_call_host( arg0 : * mut u8 , ) {
145- unsafe { $( $path_to_types) * :: __post_return_call_host:: <$ty >
146- ( arg0) } } #[ unsafe ( export_name =
147- "wasi-sample:example/adder#do-something" ) ] unsafe extern "C" fn
148- export_do_something( arg0 : i32 , ) { unsafe { $( $path_to_types) * ::
149- _export_do_something_cabi:: <$ty > ( arg0) } } } ;
139+ #[ unsafe ( export_name =
140+ "component-sample:example/adder#call-host" ) ] unsafe extern "C" fn
141+ export_call_host( arg0 : * mut u8 , arg1 : usize , ) -> * mut u8 {
142+ unsafe { $( $path_to_types) * :: _export_call_host_cabi:: <$ty >
143+ ( arg0, arg1) } } #[ unsafe ( export_name =
144+ "cabi_post_component-sample:example/adder#call-host" ) ] unsafe
145+ extern "C" fn _post_return_call_host( arg0 : * mut u8 , ) { unsafe {
146+ $( $path_to_types) * :: __post_return_call_host:: <$ty > ( arg0) } }
147+ #[ unsafe ( export_name =
148+ "component-sample:example/adder#do-something" ) ] unsafe extern "C"
149+ fn export_do_something( arg0 : i32 , ) { unsafe {
150+ $( $path_to_types) * :: _export_do_something_cabi:: <$ty > ( arg0) } }
151+ } ;
150152 } ;
151153 }
152154 #[ doc( hidden) ]
153- pub ( crate ) use __export_wasi_sample_example_adder_cabi ;
155+ pub ( crate ) use __export_component_sample_example_adder_cabi ;
154156 #[ cfg_attr( target_pointer_width = "64" , repr( align( 8 ) ) ) ]
155157 #[ cfg_attr( target_pointer_width = "32" , repr( align( 4 ) ) ) ]
156158 struct _RetArea (
@@ -275,27 +277,28 @@ macro_rules! __export_example_impl {
275277 } ;
276278 ( $ty: ident with_types_in $( $path_to_types_root: tt) * ) => {
277279 $( $path_to_types_root) * ::
278- exports:: wasi_sample:: example:: adder:: __export_wasi_sample_example_adder_cabi!( $ty
279- with_types_in $( $path_to_types_root) * :: exports:: wasi_sample:: example:: adder) ;
280+ exports:: component_sample:: example:: adder:: __export_component_sample_example_adder_cabi!( $ty
281+ with_types_in $( $path_to_types_root) * ::
282+ exports:: component_sample:: example:: adder) ;
280283 } ;
281284}
282285#[ doc( inline) ]
283286pub ( crate ) use __export_example_impl as export;
284287#[ cfg( target_arch = "wasm32" ) ]
285288#[ unsafe(
286- link_section = "component-type:wit-bindgen:0.41.0:wasi -sample:example:example:encoded world"
289+ link_section = "component-type:wit-bindgen:0.41.0:component -sample:example:example:encoded world"
287290) ]
288291#[ doc( hidden) ]
289292#[ allow( clippy:: octal_escapes) ]
290- pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 365 ] = * b"\
291- \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 \xef \x01 \x01 A\x02 \x01 \
293+ pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 380 ] = * b"\
294+ \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 \xfe \x01 \x01 A\x02 \x01 \
292295 A\x04 \x01 B\x04 \x01 @\x01 \x07 messages\x01 \0 \x04 \0 \x05 print\x01 \0 \x01 @\x01 \x05 input\
293- s\0 s\x04 \0 \x0d host-function\x01 \x01 \x03 \0 \x18 wasi -sample:example/host\x05 \0 \x01 B \
294- \x06 \x01 @\x02 \x04 lefty\x05 righty\0 y\x04 \0 \x03 add\x01 \0 \x01 @\x01 \x05 inputs\0 s \x04 \
295- \ 0\x09 call-host\x01 \x01 \x01 @\x01 \x06 numbery\x01 \0 \x04 \0 \x0c do-something\x01 \x02 \x04 \
296- \0 \x19 wasi -sample:example/adder\x05 \x01 \x04 \0 \x1b wasi -sample:example/example \x04 \
297- \ 0\x0b \x0d \x01 \0 \x07 example\x03 \0 \0 \0 G\x09 producers\x01 \x0c processed-by \x02 \x0d w \
298- it -component\x07 0.227.1\x10 wit-bindgen-rust\x06 0.41.0";
296+ s\0 s\x04 \0 \x0d host-function\x01 \x01 \x03 \0 \x1d component -sample:example/host\x05 \0 \
297+ \x01 B \ x06\x01 @\x02 \x04 lefty\x05 righty\0 y\x04 \0 \x03 add\x01 \0 \x01 @\x01 \x05 inputs\0 \
298+ s \x04 \ 0\x09 call-host\x01 \x01 \x01 @\x01 \x06 numbery\x01 \0 \x04 \0 \x0c do-something\x01 \
299+ \x02 \x04 \0 \x1e component -sample:example/adder\x05 \x01 \x04 \0 \x20 component -sample:e \
300+ xample/example \x04 \ 0\x0b \x0d \x01 \0 \x07 example\x03 \0 \0 \0 G\x09 producers\x01 \x0c pro \
301+ cessed-by \x02 \x0d wit -component\x07 0.227.1\x10 wit-bindgen-rust\x06 0.41.0";
299302#[ inline( never) ]
300303#[ doc( hidden) ]
301304pub fn __link_custom_section_describing_imports ( ) {
0 commit comments