@@ -4,8 +4,8 @@ use anyhow::Result;
44use clap:: { Args , Parser } ;
55use colored:: { ColoredString , Colorize } ;
66use dojo_bindgen:: { BuiltinPlugins , PluginManager } ;
7- use dojo_world:: local:: { ResourceLocal , WorldLocal } ;
87use dojo_world:: ResourceType ;
8+ use dojo_world:: local:: { ResourceLocal , WorldLocal } ;
99use scarb:: core:: { Config , Package , TargetKind } ;
1010use scarb:: ops:: CompileOpts ;
1111use scarb_ui:: args:: { FeaturesSpec , PackagesFilter } ;
@@ -38,6 +38,10 @@ pub struct BuildArgs {
3838 #[ arg( help = "Generate Unreal Engine bindings." ) ]
3939 pub unrealengine : bool ,
4040
41+ #[ arg( long) ]
42+ #[ arg( help = "Generate Go bindings." ) ]
43+ pub golang : bool ,
44+
4145 #[ arg( long) ]
4246 #[ arg( help = "Output directory." , default_value = "bindings" ) ]
4347 pub bindings_output : String ,
@@ -138,6 +142,10 @@ impl BuildArgs {
138142 builtin_plugins. push ( BuiltinPlugins :: UnrealEngine ) ;
139143 }
140144
145+ if self . golang {
146+ builtin_plugins. push ( BuiltinPlugins :: Golang ) ;
147+ }
148+
141149 // Custom plugins are always empty for now.
142150 let bindgen = PluginManager {
143151 profile_name : ws. current_profile ( ) . expect ( "Profile expected" ) . to_string ( ) ,
@@ -223,6 +231,7 @@ impl Default for BuildArgs {
223231 recs : false ,
224232 unity : false ,
225233 unrealengine : false ,
234+ golang : false ,
226235 bindings_output : "bindings" . to_string ( ) ,
227236 stats : StatOptions :: default ( ) ,
228237 packages : None ,
0 commit comments