Skip to content

ctypes.util.find_library support on WASM platforms #99948

Closed as not planned
Closed as not planned

Description

@ryanking13

Bug report

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.

Your environment

Linked PRs

Activity

  1. added
    type-featureA feature request or enhancement
    and removed
    type-bugAn unexpected behavior, bug, or error
    on Dec 5, 2022
  2. brettcannon commented on Aug 27, 2024

    @brettcannon
    Member

    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.

  3. ryanking13 commented on Aug 28, 2024

    @ryanking13
    ContributorAuthor

    @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.

  4. added a commit that references this issue on Sep 17, 2025
  5. added a commit that references this issue on Sep 17, 2025
  6. added a commit that references this issue on Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions