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

C2Rust: Use upstream as patches are not required any more #173

Merged
merged 5 commits into from
Mar 9, 2022

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Jan 18, 2022

C2Rust has accepted most of the patches in the current for-riot; what's left needs riot-sys fixes anyway on the long run.

Issues/PRs references

A sibling PR on RIOT docs is RIOT-OS/RIOT#17536

Status

This is on hold as a draft because it still depends on two things:

  • The no-llvm-asm branch of riot-wrappers to be merged, released and the Cargo.lock files here to be updated to use it, and
  • The unpatched C2Rust won't work for older Rust-on-RIOT versions (fixable with a cargo update, but that shouldn't be necessary for users to do to run the demos), so this will need to wait until the current release is through

-- and then maybe some time for good measure as to not cause any trouble for people on branches that haven't received the no-llvm-asm riot-wrappers update from RIOT yet.

[edit: Turned into a checklist, as first item is done]

@chrysn chrysn force-pushed the use-upstream-c2rust branch from 7647671 to a735fd6 Compare January 18, 2022 18:09
@chrysn
Copy link
Member Author

chrysn commented Jan 18, 2022

Also, given that it's now generic-C2Rust and not RIOT-vendored, it might be a good time to go all the way to making it a Debian package; it would still be buildable through the Dockerfile, but also in a standalone way.

@chrysn
Copy link
Member Author

chrysn commented Mar 8, 2022

The 2022.01 release is through, and I'd like to update this now -- one more step toward doing things the nice and easy way.

Along with the mere version and upstream source change, I've moved a few components over into the Debian package creation. This makes it easier to build a suitable c2rust also for other containers that might not be based on the precise Ubuntu version riotdocker is currently using, and the README reflects that.

@chrysn chrysn force-pushed the use-upstream-c2rust branch from 16da86c to 503b060 Compare March 8, 2022 18:00
@chrysn
Copy link
Member Author

chrysn commented Mar 8, 2022

The updates contained signs of brief confusion (I thought there couldn't be COPY .../foo* wildcards because I entered them wrong, revisited deb version as a result, found that I was wrong about COPY and just mistyped, but that the version doesn't add anything anyway), so I force-pushed over the few-minutes old additions for clarity.

@chrysn chrysn marked this pull request as ready for review March 8, 2022 18:02
@chrysn
Copy link
Member Author

chrysn commented Mar 8, 2022

Tested by building riotdocker on it, and building the rust-gcoap example for native, microbit-v2 and hifive1b.

(Not that I'd expect any change -- this is practically just switching to upstream which merged my PRs, and changing things about how c2rust is built).

Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

ACK.

(This is simpler now, less forks involved, but the c2rust build story is still something that I wouldn't read to my kids ;) )

@kaspar030
Copy link
Contributor

bors merge

@chrysn
Copy link
Member Author

chrysn commented Mar 9, 2022

Thanks, submission in process.

c2rust build story

Fortunately, upstream has started porting it away from using compiler internals to using regularly released crates (albeit still at an early stage). Once that's done, it'll be a less-than-5-minutes bed time story ending with "and they used cargo install c2rust happily ever after".

@kaspar030
Copy link
Contributor

Once that's done, it'll be a less-than-5-minutes bed time story ending with "and they used cargo install c2rust happily ever after".

nice, looking forward to that!

@bors
Copy link
Contributor

bors bot commented Mar 9, 2022

Build succeeded:

@bors bors bot merged commit 4b102d6 into RIOT-OS:master Mar 9, 2022
@chrysn chrysn deleted the use-upstream-c2rust branch March 9, 2022 11:04
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