You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ctypes.util.find_library support on WASM platforms #99948
ctypes.util.find_library doesn't work on WASM platforms like emscripten, wasi.
There is no condition that handles sys.platform in ('emscripten', 'wasi'), and it always returns None since the subprocess module is not available in WASM platforms.
I actually think this is the right outcome. You can't find an appropriate library that will work with ctypes under WASI since nothing will work (dynamic loading isn't supported), so always returning None makes sense to me. As such, I'm closing this. If you think I'm missing something, though, I can reopen to discuss it further.
@brettcannon Thank you for remembering this issue. I opened this issue with more of an Emscripten use in mind than WASI, but I agree that Emscripten is currently an unsupported platform anyway, and would be difficult to add until it becomes a tier 3 platform again.
Activity
brettcannon commentedon Aug 27, 2024
I actually think this is the right outcome. You can't find an appropriate library that will work with ctypes under WASI since nothing will work (dynamic loading isn't supported), so always returning
Nonemakes sense to me. As such, I'm closing this. If you think I'm missing something, though, I can reopen to discuss it further.ryanking13 commentedon Aug 28, 2024
@brettcannon Thank you for remembering this issue. I opened this issue with more of an Emscripten use in mind than WASI, but I agree that Emscripten is currently an unsupported platform anyway, and would be difficult to add until it becomes a tier 3 platform again.
FYI, Pyodide is patching ctypes.util.find_library to support a few packages.
gh-99948: Support ctypes.util.find_library in emscripten environment (#…
pythongh-99948: Support ctypes.util.find_library in emscripten enviro…
[3.14] gh-99948: Support ctypes.util.find_library in emscripten envir…