oden/third-party/vendor/ttf-parser/examples/wasm
2024-03-08 11:03:01 -08:00
..
index.html Vendor things 2024-03-08 11:03:01 -08:00
README.md Vendor things 2024-03-08 11:03:01 -08:00
TTC.ttc Vendor things 2024-03-08 11:03:01 -08:00

ttf-parser as a WebAssembly module

Build

rustup target add wasm32-unknown-unknown

cargo build --target wasm32-unknown-unknown --release --manifest-path ../../c-api/Cargo.toml
cp ../../c-api/target/wasm32-unknown-unknown/release/ttfparser.wasm .

Run

You can use any webserver that can serve index.html. Here is a Python example:

python -m http.server