Skip to content

Drop cty dependency now that core::ffi has that covered#14

Merged
chrysn merged 3 commits into
mainfrom
no-cty
May 13, 2026
Merged

Drop cty dependency now that core::ffi has that covered#14
chrysn merged 3 commits into
mainfrom
no-cty

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Oct 3, 2022

Given that this introduces yet another round of "signed vs unsigned char" errors on ARM architectures, this probably needs to sit and wait for a large breaking change. It's probably worth just biting through that once...

@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Oct 3, 2022

Seems like the type drama in the tests was "just" caused by having some dependencies not updated (falling back to older versions).

There might still be flip-flopping (cty on ARM has c_char = u8, core::ffi has c_char = i8), but given that all Rust code must support either already anyway, maybe it's not even a breaking change in some sense.

chrysn added 3 commits May 4, 2026 20:44
As the types re-exported from there are aliases to the native types (i8
etc) and not newtypes, they can compatibly be replaced with their
now-stdlib definitions.
Now that a recent change made 1.64 mandatory, this can just as well be
done now.
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented May 4, 2026

Rebased now that #66 is opening the 'breaking change' box.

As the previous merge conflict indicates, this might also be a good occasion to revisit whether .size_t_is_usize(false) is a good choice.

chrysn added a commit to chrysn-pull-requests/RIOT that referenced this pull request May 4, 2026
In addition to the previous PRs, this now also pulls in
RIOT-OS/rust-riot-sys#14, which is also expected
to be only technically breaking, and in particular not breaking
riot-wrappers or code based on it.
chrysn added a commit to RIOT-OS/rust-riot-wrappers that referenced this pull request May 4, 2026
chrysn added a commit to RIOT-OS/rust-riot-wrappers that referenced this pull request May 12, 2026
chrysn added a commit to chrysn-pull-requests/RIOT that referenced this pull request May 12, 2026
In addition to the previous PRs, this now also pulls in
RIOT-OS/rust-riot-sys#14, which is also expected
to be only technically breaking, and in particular not breaking
riot-wrappers or code based on it.
chrysn added a commit to chrysn-pull-requests/RIOT that referenced this pull request May 12, 2026
In addition to the previous PRs, this now also pulls in
RIOT-OS/rust-riot-sys#14, which is also expected
to be only technically breaking, and in particular not breaking
riot-wrappers or code based on it.
chrysn added a commit that referenced this pull request May 13, 2026
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented May 13, 2026

I've given this some testing through RIOT-OS/rust-riot-wrappers#154 and trying it on the riot-examples, so I think this is the right path -- and now that 0.8 is in main, it is becoming mergeable.

It seems we've already been through all possible breakage of char being signed on some platforms and unsigned on others (which is what I feared would be the fallout of this).

I'll defer the size_t_is_usized revisiting for another PR.

@chrysn chrysn requested review from Teufelchen1 and maribu May 13, 2026 12:22
@chrysn chrysn merged commit bf3eb65 into main May 13, 2026
4 of 5 checks passed
@chrysn chrysn deleted the no-cty branch May 13, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants