@@ -92,14 +92,21 @@ fn init_command(matches: &ArgMatches) -> Result<()> {
9292fn dev_command ( matches : & ArgMatches ) -> Result < ( ) > {
9393 let runner = matches. value_of ( "runner" ) ;
9494 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 ( ) ;
9599 let exit_on_panic = matches. is_present ( "exit-on-panic" ) ;
96100 let config = matches. value_of ( "config" ) ;
97101 let args: Vec < String > = matches
98102 . values_of ( "args" )
99103 . map ( |a| a. into_iter ( ) . map ( |v| v. to_string ( ) ) . collect ( ) )
100104 . unwrap_or_default ( ) ;
101105
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) ;
103110
104111 if let Some ( runner) = runner {
105112 dev_runner = dev_runner. runner ( runner. to_string ( ) ) ;
@@ -117,12 +124,16 @@ fn dev_command(matches: &ArgMatches) -> Result<()> {
117124fn build_command ( matches : & ArgMatches ) -> Result < ( ) > {
118125 let runner = matches. value_of ( "runner" ) ;
119126 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 ( ) ;
120131 let debug = matches. is_present ( "debug" ) ;
121132 let verbose = matches. is_present ( "verbose" ) ;
122133 let bundles = matches. values_of_lossy ( "bundle" ) ;
123134 let config = matches. value_of ( "config" ) ;
124135
125- let mut build_runner = build:: Build :: new ( ) ;
136+ let mut build_runner = build:: Build :: new ( ) . features ( features ) ;
126137 if let Some ( runner) = runner {
127138 build_runner = build_runner. runner ( runner. to_string ( ) ) ;
128139 }
0 commit comments