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

Use libffi in emscripten #53

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

hoodmane
Copy link
Contributor

Emscripten has a libffi port and malloc_closure.h won't work without significant extra work in Emscripten so use the libffi implementation.

@arigo
Copy link
Contributor

arigo commented Jan 30, 2024

Thanks for the fix! Unless I'm mistaken, Emscripten doesn't support fork() anyway and has got no way of supporting it in the future. That makes the reasoning for using the custom malloc_closure.h not apply (in the comment a few lines above your changes).

@arigo arigo enabled auto-merge (squash) January 30, 2024 10:08
@arigo arigo merged commit 954cab4 into python-cffi:main Jan 30, 2024
60 checks passed
@hoodmane
Copy link
Contributor Author

Thanks for the quick merge @arigo!

Unless I'm mistaken, Emscripten doesn't support fork() anyway

Actually, it does support threads:
https://emscripten.org/docs/porting/pthreads.html
I don't think the issues apply here anyways, and I always do single threaded builds so I guess someone else can investigate if they are concerned...

@hoodmane hoodmane deleted the emscripten-use-libffi branch January 30, 2024 16:58
@arigo
Copy link
Contributor

arigo commented Jan 30, 2024

Yes, threads are fine. The issue with libffi on Linux comes from calling fork(), which is its own different beast.

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