@@ -4,8 +4,8 @@ use anyhow::Result;
4
4
use clap:: { Args , Parser } ;
5
5
use colored:: { ColoredString , Colorize } ;
6
6
use dojo_bindgen:: { BuiltinPlugins , PluginManager } ;
7
- use dojo_world:: local:: { ResourceLocal , WorldLocal } ;
8
7
use dojo_world:: ResourceType ;
8
+ use dojo_world:: local:: { ResourceLocal , WorldLocal } ;
9
9
use scarb:: core:: { Config , Package , TargetKind } ;
10
10
use scarb:: ops:: CompileOpts ;
11
11
use scarb_ui:: args:: { FeaturesSpec , PackagesFilter } ;
@@ -38,6 +38,10 @@ pub struct BuildArgs {
38
38
#[ arg( help = "Generate Unreal Engine bindings." ) ]
39
39
pub unrealengine : bool ,
40
40
41
+ #[ arg( long) ]
42
+ #[ arg( help = "Generate Go bindings." ) ]
43
+ pub golang : bool ,
44
+
41
45
#[ arg( long) ]
42
46
#[ arg( help = "Output directory." , default_value = "bindings" ) ]
43
47
pub bindings_output : String ,
@@ -60,25 +64,25 @@ pub struct BuildArgs {
60
64
pub struct StatOptions {
61
65
#[ arg( long = "stats.by-tag" ) ]
62
66
#[ arg( help = "Sort the stats by tag." ) ]
63
- #[ arg( conflicts_with_all = [ "stats.by-sierra-mb " , "stats.by-sierra-felts " , "stats.by-casm-felts " ] ) ]
67
+ #[ arg( conflicts_with_all = [ "sort_by_sierra_mb " , "sort_by_sierra_felts " , "sort_by_casm_felts " ] ) ]
64
68
#[ arg( default_value_t = false ) ]
65
69
pub sort_by_tag : bool ,
66
70
67
71
#[ arg( long = "stats.by-sierra-mb" ) ]
68
72
#[ arg( help = "Sort the stats by Sierra file size in MB." ) ]
69
- #[ arg( conflicts_with_all = [ "stats.by-tag " , "stats.by-sierra-felts " , "stats.by-casm-felts " ] ) ]
73
+ #[ arg( conflicts_with_all = [ "sort_by_tag " , "sort_by_sierra_felts " , "sort_by_casm_felts " ] ) ]
70
74
#[ arg( default_value_t = false ) ]
71
75
pub sort_by_sierra_mb : bool ,
72
76
73
77
#[ arg( long = "stats.by-sierra-felts" ) ]
74
78
#[ arg( help = "Sort the stats by Sierra program size in felts." ) ]
75
- #[ arg( conflicts_with_all = [ "stats.by-tag " , "stats.by-sierra-mb " , "stats.by-casm-felts " ] ) ]
79
+ #[ arg( conflicts_with_all = [ "sort_by_tag " , "sort_by_sierra_mb " , "sort_by_casm_felts " ] ) ]
76
80
#[ arg( default_value_t = false ) ]
77
81
pub sort_by_sierra_felts : bool ,
78
82
79
83
#[ arg( long = "stats.by-casm-felts" ) ]
80
84
#[ arg( help = "Sort the stats by Casm bytecode size in felts." ) ]
81
- #[ arg( conflicts_with_all = [ "stats.by-tag " , "stats.by-sierra-mb " , "stats.by-sierra-felts " ] ) ]
85
+ #[ arg( conflicts_with_all = [ "sort_by_tag " , "sort_by_sierra_mb " , "sort_by_sierra_felts " ] ) ]
82
86
#[ arg( default_value_t = false ) ]
83
87
pub sort_by_casm_felts : bool ,
84
88
}
@@ -138,6 +142,10 @@ impl BuildArgs {
138
142
builtin_plugins. push ( BuiltinPlugins :: UnrealEngine ) ;
139
143
}
140
144
145
+ if self . golang {
146
+ builtin_plugins. push ( BuiltinPlugins :: Golang ) ;
147
+ }
148
+
141
149
// Custom plugins are always empty for now.
142
150
let bindgen = PluginManager {
143
151
profile_name : ws. current_profile ( ) . expect ( "Profile expected" ) . to_string ( ) ,
@@ -223,6 +231,7 @@ impl Default for BuildArgs {
223
231
recs : false ,
224
232
unity : false ,
225
233
unrealengine : false ,
234
+ golang : false ,
226
235
bindings_output : "bindings" . to_string ( ) ,
227
236
stats : StatOptions :: default ( ) ,
228
237
packages : None ,
0 commit comments