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

Remove CGO on MacOS (far future) #2985

Open
MatejMagat305 opened this issue May 17, 2022 · 1 comment
Open

Remove CGO on MacOS (far future) #2985

MatejMagat305 opened this issue May 17, 2022 · 1 comment
Labels
enhancement New feature or request future Features that might take a while to be sheduled

Comments

@MatejMagat305
Copy link
Contributor

MatejMagat305 commented May 17, 2022

Of course if we can / should then perhaps a new issue to track that would make sense?

Originally posted by @andydotxyz in #911 (comment)

it is (will) really far future and I do not know whether it is suitable for this library (I mention mainly therefore, it is interesting option to progress of graphic), people of library ebiten found way how remove cgo from MacOs(they are creating own "dlopen" "extension"): hajimehoshi/ebiten#2091, ebitengine/purego#1.
It depend on shared library, which open with their own (pure go) "dlopen" and "dlsym", It has advantage at build it is not nessery CGO, on the other hand it has disadvantage too, it need shared library at runtime, so I do not know ..., if yes, it will be very far future

@andydotxyz andydotxyz added enhancement New feature or request future Features that might take a while to be sheduled labels May 18, 2022
@biorisk
Copy link

biorisk commented Oct 30, 2024

I have used purego by embedding the shared library in the Go binary and writing the library to a temp directory before dlopen-ing it. I have only done this in Linux with an .so file, so I don't know if macOS security would prevent it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future Features that might take a while to be sheduled
Projects
None yet
Development

No branches or pull requests

3 participants