Skip to content

Make unused dependencies optional#118

Merged
eldruin merged 3 commits into
rust-embedded:masterfrom
Ayush1325:serial-optional
Feb 7, 2025
Merged

Make unused dependencies optional#118
eldruin merged 3 commits into
rust-embedded:masterfrom
Ayush1325:serial-optional

Conversation

@Ayush1325

Copy link
Copy Markdown
Contributor
  • I am working on some examples for PocketBeagle 2, and we have decided to use Rust for it.
  • Since it is a constrained device, it would be best to have minimal dependencies. To that end, I will be disabling default-features in most single peripheral examples.
  • However, currently some dependencies are pulled even with the default features disabled, so I would prefer it if they were also behind a selectable feature instead.

- No need to pull serialport-rs and embedded-hal-nb in projects that do
  not need serial functionality.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
@Ayush1325 Ayush1325 requested a review from a team as a code owner February 4, 2025 13:18

@eldruin eldruin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good to me, thanks!
Could you also add an entry to the changelog?

- nix dependency is only directly used for i2c in this crate.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Signed-off-by: Ayush Singh <ayush@beagleboard.org>

@eldruin eldruin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@eldruin eldruin added this pull request to the merge queue Feb 7, 2025
Merged via the queue into rust-embedded:master with commit 1ffb268 Feb 7, 2025
@Ayush1325 Ayush1325 deleted the serial-optional branch February 7, 2025 13:09
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