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

UAPI: move extern C to dediacted ffi_c module #99

Merged
merged 9 commits into from
Dec 11, 2024

Conversation

pthierry-ledger
Copy link
Member

@pthierry-ledger pthierry-ledger commented Dec 6, 2024

The goal of this PR is to avoid any extern C usage when using full Rust userspace, moving the C FFI support to a dedicated module.
The following paradigm is defined:

  • In Rust, the syscall module is to be used by upper layer (typically shield). This module is safe downto arch-specific syscall implementation
  • In C the ffi_c module is to be used and hold the __sys prefix for each syscall, as this API is bare and, like for Rust, should be used through the shield abstracted API

cargo-fmt has been fixed for overall UAPI
cargo-clippy is fixed in all UAPI except svc_exchange (to be updated in another PR)

NOTE: this PR impact the kernel API

@pthierry-ledger pthierry-ledger added api impact the external API of the component lang:rust Pull requests that update Rust code labels Dec 6, 2024
@pthierry-ledger pthierry-ledger marked this pull request as ready for review December 6, 2024 15:01
uapi/src/lib.rs Outdated Show resolved Hide resolved
uapi/src/syscall.rs Show resolved Hide resolved
@pthierry-ledger pthierry-ledger merged commit 8312b6e into outpost-os:main Dec 11, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api impact the external API of the component lang:rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants