Skip to main content

Crate vexy_vsvg_wasm

Crate vexy_vsvg_wasm 

Source
Expand description

WebAssembly bindings for Vexy Vsvg.

Provides two API tiers:

  • Enhanced: Full-featured API with metrics, streaming, and error details
  • Minimal: Smallest possible bundle (~50KB gzipped) with basic optimization only

§Usage (JavaScript/TypeScript)

import init, { optimize } from './vexy_vsvg_wasm.js';

await init();

const config = new JsConfig();
config.multipass = true;
config.pretty = true;

const result = optimize(svgString, config);
console.log(`Reduced by ${result.sizeReduction}%`);
console.log(result.data);

§Bundle Size

  • Enhanced: ~200KB gzipped (includes all 52 plugins)
  • Minimal: ~50KB gzipped (6 most impactful plugins only)

Modules§

stub
Stub implementations for non-WASM targets.