A privacy-focused, in-browser OCR tool for the Mon language (mnw), built with Rust and WebAssembly.
MonOCR Web brings optical character recognition for the Mon script directly to the browser. By leveraging ONNX Runtime Web and a custom Wasm backend, it performs all processing locally on the user's device. This ensures zero data latency and complete privacy—no images are ever sent to a server.
pnpm install
To run locally, we need to copy the pre-built ONNX Runtime WASM files from node_modules to static/wasm/.
pnpm run copy-wasm
pnpm dev
# Note: This automatically runs copy-wasm before starting
To create a production build (static site):
pnpm build
Note: The build script automatically removes the large monocr.onnx model from the output to comply with Cloudflare's 25MB asset limit. In production, the model is fetched directly from Hugging Face.
This project is optimized for Cloudflare Pages.
pnpm buildbuildstatic/wasm/ (ensure these are committed to git).src/lib/config.ts).If you have wrangler installed/configured:
npx wrangler deploy
(This uses the wrangler.json configuration to deploy the build folder).
MIT