/sparkline-svg

A Sparkline SVG generator as a Wasm component

Primary LanguageRust

sparkline-svg

Sparkline SVG is a sparkline generator that compiles to a Wasm component.

Try the CLI example to generate sparkline SVGs using the Homestar runtime.

Build

Build with a Wasm target.

cargo build --target wasm32-unknown-unknown

Componentize

Componentize the Wasm binary.

wasm-tools component new target/wasm32-unknown-unknown/debug/sparkline_svg.wasm -o output/sparkline_svg.wasm

Features

The vector-effects feature uses vector-effect="non-scaling-stroke" and is set by default. If your use case does not support vector effects, compile with:

cargo build --target wasm32-unknown-unknown --no-default-features