wasm-pack build --target web --features wasm
# or via Trunk (see examples/unmark/):
cd examples/unmark && trunk serve<script type="module">
import init, {
clean_text_wasm,
inspect_text_wasm,
clean_bytes_wasm,
} from "./pkg/cum_rs.js";
await init();
const result = JSON.parse(clean_text_wasm("Hello\u200b world\ufeff!"));
console.log(result.cleaned); // "Hello world!"
console.log(result.removed_count); // 2
</script>See the live example in examples/unmark/: a split-panel Yew 0.22 CSR app that accepts text or file upload on the left and shows the cleaned output on the right with Copy / Download buttons.
cum-rs operates entirely client-side (pure computation on input bytes). No network requests are made.