@@ -92,14 +92,21 @@ fn init_command(matches: &ArgMatches) -> Result<()> {
92
92
fn dev_command ( matches : & ArgMatches ) -> Result < ( ) > {
93
93
let runner = matches. value_of ( "runner" ) ;
94
94
let target = matches. value_of ( "target" ) ;
95
+ let features: Vec < String > = matches
96
+ . values_of ( "features" )
97
+ . map ( |a| a. into_iter ( ) . map ( |v| v. to_string ( ) ) . collect ( ) )
98
+ . unwrap_or_default ( ) ;
95
99
let exit_on_panic = matches. is_present ( "exit-on-panic" ) ;
96
100
let config = matches. value_of ( "config" ) ;
97
101
let args: Vec < String > = matches
98
102
. values_of ( "args" )
99
103
. map ( |a| a. into_iter ( ) . map ( |v| v. to_string ( ) ) . collect ( ) )
100
104
. unwrap_or_default ( ) ;
101
105
102
- let mut dev_runner = dev:: Dev :: new ( ) . exit_on_panic ( exit_on_panic) . args ( args) ;
106
+ let mut dev_runner = dev:: Dev :: new ( )
107
+ . exit_on_panic ( exit_on_panic)
108
+ . args ( args)
109
+ . features ( features) ;
103
110
104
111
if let Some ( runner) = runner {
105
112
dev_runner = dev_runner. runner ( runner. to_string ( ) ) ;
@@ -117,12 +124,16 @@ fn dev_command(matches: &ArgMatches) -> Result<()> {
117
124
fn build_command ( matches : & ArgMatches ) -> Result < ( ) > {
118
125
let runner = matches. value_of ( "runner" ) ;
119
126
let target = matches. value_of ( "target" ) ;
127
+ let features: Vec < String > = matches
128
+ . values_of ( "features" )
129
+ . map ( |a| a. into_iter ( ) . map ( |v| v. to_string ( ) ) . collect ( ) )
130
+ . unwrap_or_default ( ) ;
120
131
let debug = matches. is_present ( "debug" ) ;
121
132
let verbose = matches. is_present ( "verbose" ) ;
122
133
let bundles = matches. values_of_lossy ( "bundle" ) ;
123
134
let config = matches. value_of ( "config" ) ;
124
135
125
- let mut build_runner = build:: Build :: new ( ) ;
136
+ let mut build_runner = build:: Build :: new ( ) . features ( features ) ;
126
137
if let Some ( runner) = runner {
127
138
build_runner = build_runner. runner ( runner. to_string ( ) ) ;
128
139
}
0 commit comments