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

support libffi (and ctypes) #2

Open
williamstein opened this issue Nov 23, 2022 · 3 comments
Open

support libffi (and ctypes) #2

williamstein opened this issue Nov 23, 2022 · 3 comments

Comments

@williamstein
Copy link
Contributor

See:

@williamstein williamstein transferred this issue from sagemathinc/cowasm Dec 2, 2022
@williamstein
Copy link
Contributor Author

I've added PARTIAL support, but put the EM_JS stuff as stubs for now. This means that obviously some functionality won't work. This is just a tiny step so all those random scripts that import ctypes and do nothing with it (it's usually platform specific stuff on macos or windows) will at least not crash.

@williamstein
Copy link
Contributor Author

Example:

>>> import ctypes
>>> ctypes.pythonapi["PyObject_Str"]()
STUB: ffi_call
0

There is nothing difficult about fully supporting this properly. It's just a matter of organization and understanding the hard work already done by https://github.com/hoodmane/libffi-emscripten

Thanks!

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

No branches or pull requests

2 participants