Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the libudev dependency optional #709

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

ivmarkov
Copy link
Contributor

@ivmarkov ivmarkov commented Dec 19, 2024

Subject says it all.

The main driver for this is to be able to cross-compile espflash for other Linux targets (e.g. Raspberry Pi) with either:

cross build --release --target=arm-unknown-linux-gnueabihf

or

cargo zigbuild --target aarch64-unknown-linux-gnu.2.17

Neither of these can do it when the dependency to libudev is present, and both do succeed when the dependency to libudev is not there.

I'm yet to test this on a RPI (real soon), but on a regular Ubuntu 22.04, disabling the libudev dependency actually does not lead to a visible loss in functionality. At least not when espflash is driven programmatically via its API as I did.
/dev/ttyUSB0 is still detected as the serial port where the esp32(s3) device is answering.

@ivmarkov
Copy link
Contributor Author

@SergioGasquez I think somebody needs to run cargo clippy --allow-dirty --fix on this project so that we make latest clippy happy.

I can do it as part of this PR, but that might mean the 3-line change I did might get lost in the noise?

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@SergioGasquez SergioGasquez added this pull request to the merge queue Dec 19, 2024
Merged via the queue into esp-rs:main with commit cc26a69 Dec 19, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants