Metadata-Version: 2.1
Name: wasmpy-build
Version: 0.3.2
Summary: WebAssembly build tool for CPython C extensions
Home-page: https://github.com/olivi-r/wasmpy-build
Author: Olivia Ryan
Author-email: olivia.r.dev@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: appdirs
Requires-Dist: requests
Requires-Dist: tqdm

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

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, 3.10 and 3.11 but I'm hoping to add support for older and future versions.

The project will automatically download [wasi-sdk](https://github.com/WebAssembly/wasi-sdk) on first use.

# Installation
### Install from pip

```bash
pip install wasmpy-build
```

### or build from source

```bash
git clone --recurse-submodules https://github.com/olivi-r/wasmpy-build
cd wasmpy-build
pip install patch
python patch_headers.py
python -m pip install .
```

# Usage

Simply pass the C or C++ file and any extra arguments straight to the compiler.

```bash
wasmpy-build my_file.c -o my_file.wasm
```
