This project shows how to compile a rust library to a wasm library using only cargo
.
The example project is a function that calculates pi.
$ rustup target add wasm32-unknown-unknown
$ cargo build
$ pip install pywasm
$ python script/run.py
# pi = 3.1415926535901733