mediancut-wasm
v0.2.1
Published
Median Cut algorithm implemented in Rust and compiled to WebAssembly
Downloads
7
Readme
mediancut-wasm
Setup
Install
cargo install wasm-pack
Create
$ cargo new --lib mediancut-wasm
Development
Build
wasm-pack build --target web --release
TODO: Merge the two builds into one.
Test
cargo test -- --nocapture
Debug
cat buckets_rust.json | jq '[.buckets[].total] | add'
cat buckets_rust.json | jq '[.buckets[].colors[][3]] | add'
cat buckets_js.json | jq '[.buckets[].total] | add'
cat buckets_js.json | jq '[.buckets[].colors[][3]] | add'