12
0
Fork
You've already forked rust-riot-sys
0

Reduce headers processed through C2Rust to minimum #55

Open
chrysn wants to merge 1 commit from c2rust-ondemand into main
pull from: c2rust-ondemand
merge into: RIOT:main
RIOT:main
RIOT:gneic-from-gnc
RIOT:no-bitfields
RIOT:branch07
RIOT:branch0715
RIOT:build-updates
RIOT:marker-for-config-auto-init-enable-debug
chrysn commented 2025年01月08日 00:07:42 +01:00 (Migrated from github.com)
Copy link

We should use C2Rust only where we needed, not all across the board.

C2Rust only supports C99, no atomics, and who knows what else not – so let's not make C2Rust the default for headers, but just opt in to it.

This is a breaking change for riot-sys' downstreams, but does not (or should not: testing will show, I only did a few samples;will not, before it is merged) break riot-wrappers or known applications.

In parallel to this, we may want to explore

  • how to use bindgen to generate non-static versions of functions into a C file, build and link that, and be fine
  • whether any casual use of riot_sys::inline:: can (now?) be done away with

Testing

riot-sys' tests are rather minimal; a test PR in riot-wrappers will give us better coverage.

We should use C2Rust only where we needed, not all across the board. C2Rust only supports C99, no atomics, and who knows what else not – so let's not make C2Rust the default for headers, but just opt in to it. This is a breaking change for riot-sys' downstreams, but does not (or should not: testing will show, I only did a few samples;will not, before it is merged) break riot-wrappers or known applications. In parallel to this, we may want to explore * how to use bindgen to generate non-static versions of functions into a C file, build and link that, and be fine * whether any casual use of riot_sys::inline:: can (now?) be done away with ## Testing riot-sys' tests are rather minimal; a test PR in riot-wrappers will give us better coverage.
This pull request has changes conflicting with the target branch.
  • riot-c2rust.h
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin c2rust-ondemand:c2rust-ondemand
git switch c2rust-ondemand

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff c2rust-ondemand
git switch c2rust-ondemand
git rebase main
git switch main
git merge --ff-only c2rust-ondemand
git switch c2rust-ondemand
git rebase main
git switch main
git merge --no-ff c2rust-ondemand
git switch main
git merge --squash c2rust-ondemand
git switch main
git merge --ff-only c2rust-ondemand
git switch main
git merge c2rust-ondemand
git push origin main
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RIOT/rust-riot-sys!55
Reference in a new issue
RIOT/rust-riot-sys
No description provided.
Delete branch "c2rust-ondemand"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?