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

rust: Simplify Makefiles #21239

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Feb 21, 2025

Contribution description

Applications used to need to set 3 lines of Makefile, when really 1 should suffice.

This takes a bit of freedom from the applications, but I doubt that could be exercised: You can't have a Rust module build without platform support, and the baselib that is being built is part of the Makefile targets, so it couldn't be named any different.

Similarly, applications needed to set panic=abort in their (really: any used) profile, just so that native could build on stable. By setting that from the build system, the need to do that over and over in every example is removed.

Testing procedure

  • CI builds.

Neither of the steps allowed for any practical variation; this reduced
boilerplate.
The APPLICATION_RUST_MODULE declaration is moved to a more prominent
position, given that it is now not part of a cesspool of boilerplate any
more.
@chrysn chrysn added Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: examples Area: Example Applications Area: Rust Area: Rust wrapper labels Feb 21, 2025
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Feb 21, 2025
@riot-ci
Copy link

riot-ci commented Feb 21, 2025

Murdock results

✔️ PASSED

8c12437 makefiles/rust: Allow overriding CARGO_TARGET_DIR

Success Failures Total Runtime
10271 0 10271 08m:20s

Artifacts

The RUSTFLAGS need to be exported; passing them on through Docker is not
required for this addition, but makes sense once we touch it because
this invites callers to set them too.
@github-actions github-actions bot added the Area: sys Area: System label Feb 21, 2025
@chrysn chrysn removed Area: tests Area: tests and testing framework Area: sys Area: System labels Feb 21, 2025
@chrysn chrysn requested a review from mguetschow February 21, 2025 23:16
This allows users (such as the riot-wrappers CI) to tune their cache
directory to their application's caching needs.
@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: examples Area: Example Applications Area: Rust Area: Rust wrapper 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.

2 participants