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

Portable C binding #822

Merged
merged 5 commits into from
Jan 19, 2024
Merged

Portable C binding #822

merged 5 commits into from
Jan 19, 2024

Conversation

squell
Copy link
Member

@squell squell commented Jan 19, 2024

This will close #818 (verified on i386).

Note that the bindgen self-test that I edited don't really add much value: they're essentially testing that the [repr(C)] layout is as we expect it to be, but they go a bit beyond what a C compiler would have to guarantee; and even if the layout of these structs is different, it would still mean our PAM bindings would be correct anyway. The only important bit is that the Rust spec given matches the actual C prototypes.

Which is a given, since PAM is an extremely stable API.

This can be reviewed commit-by-commit.

@squell
Copy link
Member Author

squell commented Jan 19, 2024

Note: we should probably also add "build on a 32-bit platform" to the CI after this pull request.

Also, perhaps the bindgen scripts might also be removed (or move to a "tools" directory for future reference), since running bindgen shouldn't be needed any more.

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (2fa9234) 57.36% compared to head (3260252) 57.78%.
Report is 9 commits behind head on main.

Files Patch % Lines
src/pam/mod.rs 0.00% 8 Missing ⚠️
src/pam/sys.rs 89.70% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
+ Coverage   57.36%   57.78%   +0.41%     
==========================================
  Files          74       74              
  Lines       10559    10590      +31     
==========================================
+ Hits         6057     6119      +62     
+ Misses       4502     4471      -31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@squell squell force-pushed the portable-c-binding branch from 63f72bc to 326e996 Compare January 19, 2024 14:48
@squell squell force-pushed the portable-c-binding branch from 66d11f5 to 3260252 Compare January 19, 2024 14:58
@pvdrz pvdrz added this pull request to the merge queue Jan 19, 2024
Merged via the queue into main with commit 23e8b0b Jan 19, 2024
15 checks passed
@pvdrz pvdrz mentioned this pull request Jan 19, 2024
@japaric japaric deleted the portable-c-binding branch January 22, 2024 14:19
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.

bindgen_test_layout_* tests are failing on i386, armel and armhf linux
2 participants