Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

WebAssembly

The wasm feature builds mq-conv as a cdylib for wasm32-unknown-unknown, for the browser via wasm-bindgen. It bundles every format except sqlite and ocr, which need native C libraries.

wasm-pack build --target web --no-default-features --features wasm --release
FeatureFormatsSize (gzip)
wasmeverything but sqlite and ocr~2.7 MB
wasm_slimdrops image, audio, video, tar~2.3 MB
import init, { convert, detectFormat } from "./pkg/mq_conv.js";

await init();
const bytes = new Uint8Array(await file.arrayBuffer());
const markdown = convert(bytes, file.name, undefined); // filename, or a format name directly