{"id":20305097,"url":"https://github.com/olivi-r/wasmpy-build","last_synced_at":"2026-05-06T00:05:37.265Z","repository":{"id":62588229,"uuid":"323733793","full_name":"olivi-r/wasmpy-build","owner":"olivi-r","description":"WebAssembly build tool for CPython C/C++ extensions","archived":false,"fork":false,"pushed_at":"2024-07-27T13:14:04.000Z","size":521,"stargazers_count":22,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T22:34:46.642Z","etag":null,"topics":["c","cplusplus","cpp","cpython","cpython-extensions","cython","python","python3","wasi","wasi-libc","wasi-sdk","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/wasmpy-build","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olivi-r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-22T21:11:09.000Z","updated_at":"2025-07-10T05:15:17.000Z","dependencies_parsed_at":"2024-07-27T14:30:12.114Z","dependency_job_id":"2b5e20cd-d3bc-46cb-bc14-09e9853e1e51","html_url":"https://github.com/olivi-r/wasmpy-build","commit_stats":null,"previous_names":["r-james-dev/wasmpy-build"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/olivi-r/wasmpy-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivi-r%2Fwasmpy-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivi-r%2Fwasmpy-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivi-r%2Fwasmpy-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivi-r%2Fwasmpy-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olivi-r","download_url":"https://codeload.github.com/olivi-r/wasmpy-build/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivi-r%2Fwasmpy-build/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32672686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cplusplus","cpp","cpython","cpython-extensions","cython","python","python3","wasi","wasi-libc","wasi-sdk","wasm","webassembly"],"created_at":"2024-11-14T17:07:04.037Z","updated_at":"2026-05-06T00:05:37.261Z","avatar_url":"https://github.com/olivi-r.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasmpy-build\n\n[![appveyor-build](https://img.shields.io/appveyor/build/olivi-r/wasmpy-build?logo=appveyor)](https://ci.appveyor.com/project/olivi-r/wasmpy-build)\n\nThis tool can compile CPython C extension files, such as the ones created by Cython, to WebAssembly so that the extensions are platform independent.\n\nCurrently supports CPython 3.6 to 3.12.\n\n[wasi-sdk](https://github.com/WebAssembly/wasi-sdk) is automatically downloaded on first use.\n\n# Usage\n\nWasmpy-build can be easily integrated into an existing project by the use of a drop-in `build_ext` override:\n\n## From a `pyproject.toml` file\n\nThis uses an experimental feature and may not work verbatim in the future.\n\n```toml\n[build-system]\nrequires = [\"setuptools\", \"wasmpy-build\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\n# ...\n\n[tool.setuptools.cmdclass]\nbuild_ext = \"wasmpy_build.build_ext\"\n\n[[tool.setuptools.ext-modules]]\nname = \"mymodule\"\nsources = [\"mymodule.c\"]\n\n```\n\n## From a `setup.py` script\n\n```python\nfrom wasmpy_build import build_ext\nfrom setuptools import setup, Extension\n\nsetup(\n    ext_modules=[Extension(\"mymodule\", [\"mymodule.c\"])],\n    cmdclass={\"build_ext\": build_ext},\n)\n```\n\nThis also works with generated sources, like from Cython:\n\n```python\nfrom Cython.Build import cythonize\nfrom wasmpy_build import build_ext\nfrom setuptools import setup, Extension\n\nsetup(\n    ext_modules=cythonize([\n        Extension(\"mymodule\", [\"mymodule.pyx\"])\n    ]),\n    cmdclass={\"build_ext\": build_ext},\n)\n```\n\n## From the command line\n\n### C\n\n```bash\nwasmpy-build my_file.c -o my_file.wasm\n```\n\n### C++\n\n```bash\nwasmpy-build++ my_file.cpp -o my_file.wasm\n```\n\nor\n\n```bash\nwasmpy-build-cpp my_file.cpp -o my_file.wasm\n```\n\n# Installation\n\n### Install with pip\n\n```bash\npip install wasmpy-build\n```\n\n### Build from source\n\n```bash\ngit clone --recurse-submodules https://github.com/olivi-r/wasmpy-build\ncd wasmpy-build\npython generate.py\npython -m pip install .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivi-r%2Fwasmpy-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivi-r%2Fwasmpy-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivi-r%2Fwasmpy-build/lists"}