Skip to content

Add EABI C examples#176

Merged
adamgreig merged 7 commits into
mainfrom
add-eabi-C-examples
Jun 24, 2026
Merged

Add EABI C examples#176
adamgreig merged 7 commits into
mainfrom
add-eabi-C-examples

Conversation

@jonathanpallant

@jonathanpallant jonathanpallant commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This is to check Rust/C interop (but only as a basic smoke test).

It looks like cc-rs needs updating to understand all these targets, as you get errors about "this architecture doesn't have an FPU" where cc-rs failed to add an -mfpu=blah option automatically.

My fix for cc-rs was merged and released.

See #185 for additional tests we might want to add later.

This does a very basic EABI check. We don't examine all the details, but
it's enough to see whether we agree on short-enums, or the hard-float
ABI.

CI updated to install GCC (for cc-rs) and libclang1 (for bindgen).

cc-rs doesn't currently support all our targets, so this will fail.
It requires a C compiler and most CI jobs don't have one.
@jonathanpallant

Copy link
Copy Markdown
Contributor Author

Updated to use a fork of cc-rs at https://github.com/jonathanpallant/cc-rs/tree/add-more-bare-metal-arm, with a bunch of fixes for these targets. The upstream PR is at rust-lang/cc-rs#1753.

@jonathanpallant jonathanpallant marked this pull request as draft June 9, 2026 19:02
@jonathanpallant

Copy link
Copy Markdown
Contributor Author

cc-rs had a release containing my patches

@jonathanpallant jonathanpallant marked this pull request as ready for review June 12, 2026 15:14
@jonathanpallant jonathanpallant marked this pull request as draft June 12, 2026 16:31
@jonathanpallant

Copy link
Copy Markdown
Contributor Author

I drafted this to prompt me to add the extra tests, but actually these tests are better than no tests so I'm undrafting this so we can merge it. I'll make an issue to add more tests later.

@jonathanpallant jonathanpallant marked this pull request as ready for review June 15, 2026 08:53
@adamgreig adamgreig added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit c2e963b Jun 24, 2026
52 checks passed
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