Skip to main content

Emscripten compatible build script for CPython C extensions

Project description

WasmPy-Build

This tool can compile CPython C extension files, such as the ones created by Cython, to WebAssembly so that the extensions are platform independent.

The created .wasm files can be imported by WasmPy in a simmilar manner to native C extensions.

This project contains modified CPython header files as well as a build script to ease the creation of .wasm extension files.

Currently this project only supports CPython 3.8, 3.9 and 3.10 but I'm hoping to add support for older versions.

Installation

To install WasmPy-Build you will first need to install the Emscripten SDK.

Install WasmPy-Build from pip

$ pip install wasmpy-build

... or build from source

$ git clone --recurse-submodules https://github.com/olivi-r/wasmpy-build
$ cd wasmpy-build
$ python -m pip install -r requirements.txt
$ python patch_headers.py
$ python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wasmpy-build-0.2.1.tar.gz (761.0 kB view details)

Uploaded Source

Built Distribution

wasmpy_build-0.2.1-py3-none-any.whl (995.4 kB view details)

Uploaded Python 3

File details

Details for the file wasmpy-build-0.2.1.tar.gz.

File metadata

  • Download URL: wasmpy-build-0.2.1.tar.gz
  • Upload date:
  • Size: 761.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for wasmpy-build-0.2.1.tar.gz
Algorithm Hash digest
SHA256 91a3c27339ff8972c8071cd9f0c994a38e0d6d5c64312dddf88c9a6b76791e08
MD5 af7ea191999fa2d2c5a8d22555c9737b
BLAKE2b-256 a89fe79c198a0df4f7f513c2513fc091d66cce22df69d04f5e8e0f9ab30c09d4

See more details on using hashes here.

File details

Details for the file wasmpy_build-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: wasmpy_build-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 995.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for wasmpy_build-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ddbbaca1dcee41204f13d38ea3a2399b22ce11b099fa2f6ad18d28ed9b17334e
MD5 b0ff449cf048972f519d7979eb592b42
BLAKE2b-256 ae2fba9da7878c751bdf37690919a300e3bb917ad186388e73d695aca595f31b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page