@@ -17,16 +17,53 @@ impl ::core::fmt::Display for GithubError {
1717 }
1818}
1919impl std:: error:: Error for GithubError { }
20+ #[ repr( u8 ) ]
21+ #[ derive( Clone , Copy , Eq , Ord , PartialEq , PartialOrd ) ]
22+ pub enum GithubTarget {
23+ All ,
24+ Github ,
25+ Npm ,
26+ Cargo ,
27+ }
28+ impl :: core:: fmt:: Debug for GithubTarget {
29+ fn fmt ( & self , f : & mut :: core:: fmt:: Formatter < ' _ > ) -> :: core:: fmt:: Result {
30+ match self {
31+ GithubTarget :: All => f. debug_tuple ( "GithubTarget::All" ) . finish ( ) ,
32+ GithubTarget :: Github => f. debug_tuple ( "GithubTarget::Github" ) . finish ( ) ,
33+ GithubTarget :: Npm => f. debug_tuple ( "GithubTarget::Npm" ) . finish ( ) ,
34+ GithubTarget :: Cargo => f. debug_tuple ( "GithubTarget::Cargo" ) . finish ( ) ,
35+ }
36+ }
37+ }
38+ impl GithubTarget {
39+ #[ doc( hidden) ]
40+ pub unsafe fn _lift ( val : u8 ) -> GithubTarget {
41+ if !cfg ! ( debug_assertions) {
42+ return :: core:: mem:: transmute ( val) ;
43+ }
44+ match val {
45+ 0 => GithubTarget :: All ,
46+ 1 => GithubTarget :: Github ,
47+ 2 => GithubTarget :: Npm ,
48+ 3 => GithubTarget :: Cargo ,
49+ _ => panic ! ( "invalid enum discriminant" ) ,
50+ }
51+ }
52+ }
2053#[ doc( hidden) ]
2154#[ allow( non_snake_case) ]
2255pub unsafe fn _export_run_with_config_cabi < T : Guest > (
2356 arg0 : * mut u8 ,
2457 arg1 : usize ,
58+ arg2 : i32 ,
2559) -> * mut u8 {
2660 #[ cfg( target_arch = "wasm32" ) ] _rt:: run_ctors_once ( ) ;
2761 let len0 = arg1;
2862 let bytes0 = _rt:: Vec :: from_raw_parts ( arg0. cast ( ) , len0, len0) ;
29- let result1 = T :: run_with_config ( _rt:: string_lift ( bytes0) ) ;
63+ let result1 = T :: run_with_config (
64+ _rt:: string_lift ( bytes0) ,
65+ GithubTarget :: _lift ( arg2 as u8 ) ,
66+ ) ;
3067 let ptr2 = _RET_AREA. 0 . as_mut_ptr ( ) . cast :: < u8 > ( ) ;
3168 match result1 {
3269 Ok ( _) => {
@@ -68,14 +105,17 @@ pub unsafe fn __post_return_run_with_config<T: Guest>(arg0: *mut u8) {
68105 }
69106}
70107pub trait Guest {
71- fn run_with_config ( config : _rt:: String ) -> Result < ( ) , GithubError > ;
108+ fn run_with_config (
109+ config : _rt:: String ,
110+ target : GithubTarget ,
111+ ) -> Result < ( ) , GithubError > ;
72112}
73113#[ doc( hidden) ]
74114macro_rules! __export_world_action_cabi {
75115 ( $ty: ident with_types_in $( $path_to_types: tt) * ) => {
76116 const _ : ( ) = { #[ export_name = "run-with-config" ] unsafe extern "C" fn
77- export_run_with_config( arg0 : * mut u8 , arg1 : usize , ) -> * mut u8 {
78- $( $path_to_types) * :: _export_run_with_config_cabi:: <$ty > ( arg0, arg1) }
117+ export_run_with_config( arg0 : * mut u8 , arg1 : usize , arg2 : i32 , ) -> * mut u8 {
118+ $( $path_to_types) * :: _export_run_with_config_cabi:: <$ty > ( arg0, arg1, arg2 ) }
79119 #[ export_name = "cabi_post_run-with-config" ] unsafe extern "C" fn
80120 _post_return_run_with_config( arg0 : * mut u8 , ) { $( $path_to_types) * ::
81121 __post_return_run_with_config:: <$ty > ( arg0) } } ;
@@ -142,12 +182,13 @@ pub(crate) use __export_action_impl as export;
142182#[ cfg( target_arch = "wasm32" ) ]
143183#[ link_section = "component-type:wit-bindgen:0.35.0:github:rust-release:action:encoded world" ]
144184#[ doc( hidden) ]
145- pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 230 ] = * b"\
146- \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 j\x01 A\x02 \x01 A\x05 \x01 \
147- q\x01 \x06 custom\x01 s\0 \x03 \0 \x0c github-error\x03 \0 \0 \x01 j\0 \x01 \x01 \x01 @\x01 \x06 \
148- configs\0 \x02 \x04 \0 \x0f run-with-config\x01 \x03 \x04 \0 \x1a github:rust-release/acti\
149- on\x04 \0 \x0b \x0c \x01 \0 \x06 action\x03 \0 \0 \0 G\x09 producers\x01 \x0c processed-by\x02 \
150- \x0d wit-component\x07 0.220.0\x10 wit-bindgen-rust\x06 0.35.0";
185+ pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 282 ] = * b"\
186+ \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 \x9d \x01 \x01 A\x02 \x01 \
187+ A\x07 \x01 q\x01 \x06 custom\x01 s\0 \x03 \0 \x0c github-error\x03 \0 \0 \x01 m\x04 \x03 all\x06 \
188+ github\x03 npm\x05 cargo\x03 \0 \x0d github-target\x03 \0 \x02 \x01 j\0 \x01 \x01 \x01 @\x02 \x06 \
189+ configs\x06 target\x03 \0 \x04 \x04 \0 \x0f run-with-config\x01 \x05 \x04 \0 \x1a github:rus\
190+ t-release/action\x04 \0 \x0b \x0c \x01 \0 \x06 action\x03 \0 \0 \0 G\x09 producers\x01 \x0c pr\
191+ ocessed-by\x02 \x0d wit-component\x07 0.220.0\x10 wit-bindgen-rust\x06 0.35.0";
151192#[ inline( never) ]
152193#[ doc( hidden) ]
153194pub fn __link_custom_section_describing_imports ( ) {
0 commit comments