@@ -289,6 +289,7 @@ pub unsafe fn _export_before_commit_cabi<T: Guest>(
289289 arg5 : usize ,
290290 arg6 : * mut u8 ,
291291 arg7 : usize ,
292+ arg8 : i32 ,
292293) -> * mut u8 {
293294 #[ cfg( target_arch = "wasm32" ) ]
294295 _rt:: run_ctors_once ( ) ;
@@ -307,6 +308,7 @@ pub unsafe fn _export_before_commit_cabi<T: Guest>(
307308 subject : _rt:: string_lift ( bytes2) ,
308309 json_ad : _rt:: string_lift ( bytes3) ,
309310 } ,
311+ is_new : _rt:: bool_lift ( arg8 as u8 ) ,
310312 } ) ;
311313 let ptr5 = ( & raw mut _RET_AREA. 0 ) . cast :: < u8 > ( ) ;
312314 match result4 {
@@ -357,6 +359,7 @@ pub unsafe fn _export_after_commit_cabi<T: Guest>(
357359 arg5 : usize ,
358360 arg6 : * mut u8 ,
359361 arg7 : usize ,
362+ arg8 : i32 ,
360363) -> * mut u8 {
361364 #[ cfg( target_arch = "wasm32" ) ]
362365 _rt:: run_ctors_once ( ) ;
@@ -375,6 +378,7 @@ pub unsafe fn _export_after_commit_cabi<T: Guest>(
375378 subject : _rt:: string_lift ( bytes2) ,
376379 json_ad : _rt:: string_lift ( bytes3) ,
377380 } ,
381+ is_new : _rt:: bool_lift ( arg8 as u8 ) ,
378382 } ) ;
379383 let ptr5 = ( & raw mut _RET_AREA. 0 ) . cast :: < u8 > ( ) ;
380384 match result4 {
@@ -443,18 +447,19 @@ macro_rules! __export_world_class_extender_cabi {
443447 $( $path_to_types) * :: __post_return_on_resource_get:: <$ty > ( arg0) } } #[ unsafe
444448 ( export_name = "before-commit" ) ] unsafe extern "C" fn export_before_commit( arg0 :
445449 * mut u8 , arg1 : usize , arg2 : * mut u8 , arg3 : usize , arg4 : * mut u8 , arg5 :
446- usize , arg6 : * mut u8 , arg7 : usize , ) -> * mut u8 { unsafe {
450+ usize , arg6 : * mut u8 , arg7 : usize , arg8 : i32 , ) -> * mut u8 { unsafe {
447451 $( $path_to_types) * :: _export_before_commit_cabi:: <$ty > ( arg0, arg1, arg2, arg3,
448- arg4, arg5, arg6, arg7) } } #[ unsafe ( export_name = "cabi_post_before-commit" ) ]
449- unsafe extern "C" fn _post_return_before_commit( arg0 : * mut u8 , ) { unsafe {
450- $( $path_to_types) * :: __post_return_before_commit:: <$ty > ( arg0) } } #[ unsafe
451- ( export_name = "after-commit" ) ] unsafe extern "C" fn export_after_commit( arg0 : *
452- mut u8 , arg1 : usize , arg2 : * mut u8 , arg3 : usize , arg4 : * mut u8 , arg5 :
453- usize , arg6 : * mut u8 , arg7 : usize , ) -> * mut u8 { unsafe {
454- $( $path_to_types) * :: _export_after_commit_cabi:: <$ty > ( arg0, arg1, arg2, arg3,
455- arg4, arg5, arg6, arg7) } } #[ unsafe ( export_name = "cabi_post_after-commit" ) ]
456- unsafe extern "C" fn _post_return_after_commit( arg0 : * mut u8 , ) { unsafe {
457- $( $path_to_types) * :: __post_return_after_commit:: <$ty > ( arg0) } } } ;
452+ arg4, arg5, arg6, arg7, arg8) } } #[ unsafe ( export_name =
453+ "cabi_post_before-commit" ) ] unsafe extern "C" fn _post_return_before_commit( arg0
454+ : * mut u8 , ) { unsafe { $( $path_to_types) * :: __post_return_before_commit:: <$ty >
455+ ( arg0) } } #[ unsafe ( export_name = "after-commit" ) ] unsafe extern "C" fn
456+ export_after_commit( arg0 : * mut u8 , arg1 : usize , arg2 : * mut u8 , arg3 : usize ,
457+ arg4 : * mut u8 , arg5 : usize , arg6 : * mut u8 , arg7 : usize , arg8 : i32 , ) -> *
458+ mut u8 { unsafe { $( $path_to_types) * :: _export_after_commit_cabi:: <$ty > ( arg0,
459+ arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) } } #[ unsafe ( export_name =
460+ "cabi_post_after-commit" ) ] unsafe extern "C" fn _post_return_after_commit( arg0 :
461+ * mut u8 , ) { unsafe { $( $path_to_types) * :: __post_return_after_commit:: <$ty >
462+ ( arg0) } } } ;
458463 } ;
459464}
460465#[ doc( hidden) ]
@@ -535,6 +540,8 @@ pub mod atomic {
535540 pub subject : _rt:: String ,
536541 pub commit_json : _rt:: String ,
537542 pub snapshot : ResourceJson ,
543+ /// True if this is the first commit for the resource.
544+ pub is_new : bool ,
538545 }
539546 impl :: core:: fmt:: Debug for CommitContext {
540547 fn fmt (
@@ -545,6 +552,7 @@ pub mod atomic {
545552 . field ( "subject" , & self . subject )
546553 . field ( "commit-json" , & self . commit_json )
547554 . field ( "snapshot" , & self . snapshot )
555+ . field ( "is-new" , & self . is_new )
548556 . finish ( )
549557 }
550558 }
@@ -999,6 +1007,17 @@ mod _rt {
9991007 wit_bindgen_rt:: run_ctors_once ( ) ;
10001008 }
10011009 pub use alloc_crate:: alloc;
1010+ pub unsafe fn bool_lift ( val : u8 ) -> bool {
1011+ if cfg ! ( debug_assertions) {
1012+ match val {
1013+ 0 => false ,
1014+ 1 => true ,
1015+ _ => panic ! ( "invalid bool discriminant" ) ,
1016+ }
1017+ } else {
1018+ val != 0
1019+ }
1020+ }
10021021 extern crate alloc as alloc_crate;
10031022}
10041023/// Generates `#[unsafe(no_mangle)]` functions to export the specified type as
@@ -1034,29 +1053,29 @@ pub(crate) use __export_class_extender_impl as export;
10341053#[ unsafe( link_section = "component-type:wit-bindgen:0.41.0:atomic:class-extender@0.1.0:class-extender:encoded world" ) ]
10351054#[ doc( hidden) ]
10361055#[ allow( clippy:: octal_escapes) ]
1037- pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 994 ] = * b"\
1038- \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 \xdd \x06 \x01 A\x02 \x01 \
1056+ pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 1002 ] = * b"\
1057+ \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 \xe5 \x06 \x01 A\x02 \x01 \
10391058 A\x17 \x01 B\x0b \x01 r\x01 \x07 subjects\x04 \0 \x0c atomic-agent\x03 \0 \0 \x01 r\x02 \x07 su\
10401059 bjects\x07 json-ads\x04 \0 \x0d resource-json\x03 \0 \x02 \x01 p\x03 \x01 r\x02 \x07 primary\
10411060\x03 \x0a referenced\x04 \x04 \0 \x11 resource-response\x03 \0 \x05 \x01 r\x04 \x0b request-\
10421061 urls\x11 requested-subjects\x0d agent-subjects\x08 snapshot\x03 \x04 \0 \x0b get-contex\
1043- t\x03 \0 \x07 \x01 r\x03 \x07 subjects\x0b commit-jsons\x08 snapshot\x03 \x04 \0 \x0e commit \
1044- -context\x03 \0 \x09 \x03 \0 !atomic:class-extender/types@0.1.0\x05 \0 \x02 \x03 \0 \0 \x11 \
1045- resource -response\x03 \0 \x11 resource-response\x03 \0 \x01 \x02 \x03 \0 \0 \x0b get-contex \
1046- t \x03 \0 \x0b get-context\x03 \0 \x03 \x02 \x03 \0 \0 \x0e commit-context\x03 \0 \x0e commit-c \
1047- ontext \x03 \0 \x05 \x02 \x03 \0 \0 \x0d resource-json\x02 \x03 \0 \0 \x0c atomic-agent \x01 B \x12 \
1048- \ x02\x03 \x02 \x01 \x07 \x04 \0 \x0d resource-json\x03 \0 \0 \x02 \x03 \x02 \x01 \x08 \x04 \0 \x0c \
1049- atomic -agent\x03 \0 \x02 \x01 ks\x01 j\x01 \x01 \x01 s\x01 @\x02 \x07 subjects\x05 agent \x04 \
1050- \ 0\x05 \x04 \0 \x0c get-resource\x01 \x06 \x01 p\x01 \x01 j\x01 \x07 \x01 s\x01 @\x03 \x08 prop \
1051- ertys \ x05 values\x05 agent\x04 \0 \x08 \x04 \0 \x05 query\x01 \x09 \x01 @\0 \0 s\x04 \0 \x10 get \
1052- -plugin-agent\x01 \x0a \x04 \0 \x0a get-config\x01 \x0a \x01 j\0 \x01 s\x01 @\x01 \x06 commit \
1053- s \0 \x0b \x04 \0 \x06 commit\x01 \x0c \x03 \0 \x20 atomic:class-extender/host@0.1.0\x05 \x09 \
1054- \x01 ps\x01 @\0 \0 \x0a \x04 \0 \x09 class-url\x01 \x0b \x01 k\x02 \x01 j\x01 \x0c \x01 s\x01 @ \x01 \
1055- \ x03 ctx\x04 \0 \x0d \x04 \0 \x0f on-resource-get\x01 \x0e \x01 j\0 \x01 s\x01 @\x01 \x03 ctx \x06 \
1056- \ 0\x0f \x04 \0 \x0d before-commit\x01 \x10 \x04 \0 \x0c after-commit\x01 \x10 \x04 \0 *atomic \
1057- :class-extender/class-extender@0.1.0\x04 \0 \x0b \x14 \x01 \0 \x0e class-extender \x03 \0 \
1058- \0 \ 0 G\x09 producers\x01 \x0c processed-by\x02 \x0d wit-component\x07 0.227.1\x10 wit-bi \
1059- ndgen -rust\x06 0.41.0";
1062+ t\x03 \0 \x07 \x01 r\x04 \x07 subjects\x0b commit-jsons\x08 snapshot\x03 \x06 is-new \x7f \x04 \
1063+ \0 \x0e commit -context\x03 \0 \x09 \x03 \0 !atomic:class-extender/types@0.1.0\x05 \0 \x02 \
1064+ \x03 \0 \0 \x11 resource -response\x03 \0 \x11 resource-response\x03 \0 \x01 \x02 \x03 \0 \0 \x0b \
1065+ get-context \x03 \0 \x0b get-context\x03 \0 \x03 \x02 \x03 \0 \0 \x0e commit-context\x03 \0 \x0e \
1066+ commit-context \x03 \0 \x05 \x02 \x03 \0 \0 \x0d resource-json\x02 \x03 \0 \0 \x0c atomic-agen \
1067+ t \x01 B \x12 \ x02\x03 \x02 \x01 \x07 \x04 \0 \x0d resource-json\x03 \0 \0 \x02 \x03 \x02 \x01 \x08 \
1068+ \x04 \0 \x0c atomic -agent\x03 \0 \x02 \x01 ks\x01 j\x01 \x01 \x01 s\x01 @\x02 \x07 subjects\x05 \
1069+ agent \x04 \ 0\x05 \x04 \0 \x0c get-resource\x01 \x06 \x01 p\x01 \x01 j\x01 \x07 \x01 s\x01 @\x03 \
1070+ \x08 propertys \ x05 values\x05 agent\x04 \0 \x08 \x04 \0 \x05 query\x01 \x09 \x01 @\0 \0 s\x04 \0 \
1071+ \x10 get -plugin-agent\x01 \x0a \x04 \0 \x0a get-config\x01 \x0a \x01 j\0 \x01 s\x01 @\x01 \x06 \
1072+ commits \0 \x0b \x04 \0 \x06 commit\x01 \x0c \x03 \0 \x20 atomic:class-extender/host@0.1.0\x05 \
1073+ \x09 \ x01 ps\x01 @\0 \0 \x0a \x04 \0 \x09 class-url\x01 \x0b \x01 k\x02 \x01 j\x01 \x0c \x01 s\x01 \
1074+ @ \x01 \ x03 ctx\x04 \0 \x0d \x04 \0 \x0f on-resource-get\x01 \x0e \x01 j\0 \x01 s\x01 @\x01 \x03 \
1075+ ctx \x06 \ 0\x0f \x04 \0 \x0d before-commit\x01 \x10 \x04 \0 \x0c after-commit\x01 \x10 \x04 \0 \
1076+ *atomic :class-extender/class-extender@0.1.0\x04 \0 \x0b \x14 \x01 \0 \x0e class-extende \
1077+ r \x03 \0 \0 \ 0 G\x09 producers\x01 \x0c processed-by\x02 \x0d wit-component\x07 0.227.1\x10 \
1078+ wit-bindgen -rust\x06 0.41.0";
10601079#[ inline( never) ]
10611080#[ doc( hidden) ]
10621081pub fn __link_custom_section_describing_imports ( ) {
0 commit comments