esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
455 stars 110 forks source link

Add support for --no-default-features #645

Closed etiennetremel closed 2 days ago

etiennetremel commented 1 month ago

It would be a nice addition to allow disabling default features via a flag, similar to what cargo build --no-default-features --features one,two does.

Currently, espflash support adding features but doesn't allow disabling the one default one.

Related to https://github.com/esp-rs/espflash/issues/305

SergioGasquez commented 1 month ago

Could you elaborate on your use case? Currently, the only default feature of espflash is cli which can be disabled when used as a library and its fundamental when using it as a binary.

etiennetremel commented 4 weeks ago

Sorry, I wasn't really clear.

I'm using espflash from the CLI, so the feature that are being compiled and flashed into the esp32 are from my project, not from the espflash Cargo.toml:

cargo espflash flash --release --features one,two

My project has default features which I do not want, using the cargo build there is a flag that can be used to drop all default features but that's not a flag available on the espflash flash sub command.

I'm expecting to be able to do the same as cargo build, which would look like this:

cargo espflash flash --release --features one,two --no-default-features