@ideallabs/timelock_wasm_wrapper
v0.3.0
Published
Wasm bidings for the timelock encryption crate
Readme
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 pkgFor 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"Testing
Run wasm-pack tests with wasm-pack test --node
Publish
# Create a release build
maturin build --features "python" --release
# publish to PyPi with maturing
maturin publish --features "python"