Skip to content

Deburring safer-ffi (maintainability improvements) #245

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

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

danielhenrymantilla
Copy link
Collaborator

@danielhenrymantilla danielhenrymantilla commented Mar 19, 2025

Main integration branch to include a bunch of changes to make maintenance of safer-ffi and contributions to it easier.

danielhenrymantilla and others added 10 commits March 20, 2025 17:12
Lua FFI has a few notable differrences from regular generated C headers:
* Custom prelude/epilogue with `ffi.cdef` directive.
* Constants defined using `static const` syntax instead of `#define`.
* Different comments format using `--` or `[[` instead of `/* */`.
* Doesn't support `#include`, `#ifdef` or other macros.

Lua FFI described in more details at http://luajit.org/ext_ffi.html

Other changes:
* Added const generics support for the structs.
* Added implementation for array of any const size `N`.
* Added `try_as_str` implementation for `str_ref` and `slice_ref<u8>`.
the undocumented names (without period in dotnet 5+) can drop their support when move to double-digit (to avoid potential conflicts) https://learn.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks
* Bump MSRV to `1.85.0`

* Start working on `0.2.0` version

* Rust 1.85.0 cleanup

* Do not make `releasable-to-crates-io` GHA step mandatory, until it gets fixed/improved

* `mv {ffi,js}_tests/.cargo/config{,.toml}`

* Nits

* Remove unknown `cfg` warning when targeting js

* Use more recent `nightly` in the `no_std` proper test
rustfmt some mods which had been skipped
feat(alloc): Add support for `repr_c::Arc<T>`
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.

5 participants