File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Added
10
11
- Add ` hold-in-reset ` and ` reset ` subcommands
12
+ - [ cargo-espflash] : Add ` --no-default-features ` flag to mirror cargo features behavior
11
13
12
14
## [ 3.1.0] - 2024-05-24
13
15
Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ struct BuildArgs {
128
128
/// Comma delimited list of build features
129
129
#[ arg( long, use_value_delimiter = true ) ]
130
130
pub features : Option < Vec < String > > ,
131
+ /// Do not activate the `default` feature
132
+ #[ arg( long) ]
133
+ pub no_default_features : bool ,
131
134
/// Require Cargo.lock and cache are up to date
132
135
#[ arg( long) ]
133
136
pub frozen : bool ,
@@ -373,6 +376,9 @@ fn build(
373
376
. ok_or_else ( || NoTargetError :: new ( Some ( chip) ) ) ?;
374
377
375
378
let mut metadata_cmd = MetadataCommand :: new ( ) ;
379
+ if build_options. no_default_features {
380
+ metadata_cmd. features ( cargo_metadata:: CargoOpt :: NoDefaultFeatures ) ;
381
+ }
376
382
if let Some ( features) = & build_options. features {
377
383
metadata_cmd. features ( cargo_metadata:: CargoOpt :: SomeFeatures ( features. clone ( ) ) ) ;
378
384
}
@@ -435,6 +441,10 @@ fn build(
435
441
args. push ( package. to_string ( ) ) ;
436
442
}
437
443
444
+ if build_options. no_default_features {
445
+ args. push ( "--no-default-features" . to_string ( ) ) ;
446
+ }
447
+
438
448
if let Some ( features) = & build_options. features {
439
449
args. push ( "--features" . to_string ( ) ) ;
440
450
args. push ( features. join ( "," ) ) ;
You can’t perform that action at this time.
0 commit comments