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

ffi purego #276

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

ffi purego #276

wants to merge 1 commit into from

Conversation

gysddn
Copy link

@gysddn gysddn commented Jan 16, 2025

  • Added purego the ffi submodule
  • Loading libffi.dylib at init of the module
  • Replaced all cgo function calls with purego bindings
  • Added structs and enums needed for these functions
  • Updated some calls to use the new enums
  • Used purego callback system for handleClosure
  • Removed ffi.m file

This commit leaves some parts of cgo to not break the api but all these parts can be removed by updating the appropriate files using them. cgo, in some places, is exposed to the rest of the api, most notibly the cgo.Handle.

- Added purego the ffi submodule
- Loading `libffi.dylib` at init of the module
- Replaced all cgo function calls with purego bindings
- Added structs and enums needed for these functions
- Updated some calls to use the new enums
- Used purego callback system for handleClosure
- Removed ffi.m file

This commit leaves some parts of cgo to not break the api
but all these parts can be removed by updating the appropriate
files using them. cgo, in some places, is exposed to the rest of
the api, most notibly the cgo.Handle.
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.

1 participant