Skip to content

Latest commit

 

History

History

wasm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WASM Bindings for Timelock

This crate provides wasm compatibility for the timelock crate. It provides compatibility for both JavaScript and Python (3+).

Build

For JavaScript Compatibility

To compile to wasm, first build the project and them run wasm-pack

cargo build
wasm-pack build --target web --out-dir pkg

For Python Compatibility

Python compatible wasm output is generated with PyO3.

First create a virtual env, then run:

pip install maturin
# specify your python version
export PYO3_CROSS_PYTHON_VERSION="3.10"
maturin develop --features "python"

Publish

# Create a release build
maturin build --features "python" --release
# publish to PyPi with maturing
maturin publish --features "python"