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

[purego] PoC for FreeBSD and Linux #393

Closed
wants to merge 8 commits into from

Conversation

JupiterRider
Copy link
Contributor

(Don't merge, this is just a proof of concept for discussion.)

purego supports FreeBSD and Linux, but it doesn't support passing or returning structs on these platforms, so I created a libffi binding as workaround.

I implemented some raylib functions in this pull, to show how the code could look like.

@gen2brain What do you think?

@gen2brain
Copy link
Owner

Very nice that it works, and libffi should be everywhere by default, but the first thing I thought was that it would be yet another binding that needs to be maintained, a third one. What about purego, is there a chance passing structs would be implemented for Linux? I think I saw some work done on this subject but for macOS.

@JupiterRider
Copy link
Contributor Author

JupiterRider commented Jun 1, 2024

What about purego, is there a chance passing structs would be implemented for Linux? I think I saw some work done on this subject but for macOS.

Yes, there is a chance, but I don't know when it will come: ebitengine/purego#236

Very nice that it works, and libffi should be everywhere by default, but the first thing I thought was that it would be yet another binding that needs to be maintained, a third one.

I agree! We don't even have a solution jet to compare the API (cgo <-> !cgo).

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