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

treewide: Update Rust dependencies #21133

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Jan 13, 2025

Contribution description

This updates riot-sys and riot-wrappers, as well as other Rust dependencies.

See issue references for what changes in our crates; outside that, none of the updates stand out particularly. (There are some auto-updates around proc-macro and Unicode, but that's just host side tooling).

Testing procedure

CI build testing should suffice.

Issues/PRs references

Complete list of PRs pulled in to this in our crates:

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System Area: examples Area: Example Applications labels Jan 13, 2025
@chrysn chrysn added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 13, 2025
@chrysn chrysn marked this pull request as ready for review January 13, 2025 12:38
@chrysn chrysn requested a review from Teufelchen1 January 13, 2025 12:41
Copy link
Contributor

@Teufelchen1 Teufelchen1 left a comment

Choose a reason for hiding this comment

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

That's a lot of dependencies.

@chrysn chrysn enabled auto-merge January 13, 2025 14:03
@riot-ci
Copy link

riot-ci commented Jan 13, 2025

Murdock results

✔️ PASSED

5d7bff8 treewide: Update riot-sys

Success Failures Total Runtime
10271 0 10271 22m:16s

Artifacts

@chrysn chrysn disabled auto-merge January 13, 2025 14:06
@chrysn
Copy link
Member Author

chrysn commented Jan 13, 2025

CI said no; apparently, SPI clocks are odd somewhere.

That's a lot of dependencies.

Yes it is. It makes sense to take a more fine-grained viewpoint, though:

  • Many of those in Cargo.lock don't even show up in the Cargo tree (ie. they have no way of influencing the build): For example, windows-sys gets pulled in through libc and errno, but only when building on Windows.
  • Many that do show up in the cargo tree are build tools, eg. bindgen. In other environments than cargo, we might just require a CLI tool to be installed and have the build system call out to it. On Rust, it is common for build.rs to just pull in a crate for that – both making it convenient for the user to not have to install an extra tool (like c2rust where sadly that all doesn't work) and for us to have good control of when things may break, but on the downside those are all listed as dependencies.
  • A cargo tree --edges normal still shows a lot of crates, but of a more managable size. Many of those are interface-only crates (embedded-graphics, embedded-hal, coap-message, switch-hal, mutex-trait) – we could make those optional, but given they are rather cheap for all other aspects than the list, that'd just make maintenance harder.
    • Besides riot-wrappers, also coap-handler-implementations pulls in such a swath of (partially old, even dangerous) interfaces (eg. multiple versions of minicbor). They don't do anything (no code emitted from there) unless someone else comes with "hey I have data from that library, please send it", but once more, making all them optional would put an otherwise useless load on maintenance.

@chrysn
Copy link
Member Author

chrysn commented Jan 13, 2025

This can be unblocked by RIOT-OS/rust-riot-wrappers#144, which needs to be merged before I can unblock this PR.

This pulls in the changes of [144].

[144]: RIOT-OS/rust-riot-wrappers#144
@chrysn
Copy link
Member Author

chrysn commented Jan 13, 2025

The last patch updates riot-sys only to address the previous build failures.

@Teufelchen1 Teufelchen1 added this pull request to the merge queue Jan 14, 2025
Merged via the queue into RIOT-OS:master with commit e09a800 Jan 14, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: examples Area: Example Applications Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants