📄️ WebAssembly Overview
Detailed reference documentation for all Img2Num WebAssembly code. Use this as a guide to understand, use, and contribute to the project's C / C++ codebase.
📄️ Setup & Dependencies
To build the WASM modules you will need a working Emscripten toolchain (emsdk) available on your PATH and a Unix-y shell environment (bash / WSL / macOS). Steps in brief:
📄️ Using WASM modules in React
vite.config.js generates aliases of the form @wasm- that map to src/wasm/modules/{module}/build at resolve time. This makes importing convenient:
📄️ Development workflow & watch behavior
This repository configures a Vite plugin (watch-cpp-and-build-wasm) that watches .cpp and .h files and runs npm run build-wasm when changes occur. The plugin logic prevents overlapping builds with a isBuilding flag.
📄️ Troubleshooting & size/ perf optimizations
The browser fails to load .wasm with 404/incorrect MIME type
📄️ Adding a new WASM module
1. Create a new directory: src/wasm/modules//.
🗃️ Modules
2 items