Image / video labeling backend for the MoonbitLabeler app: 21 async ops over @fs/@json for folder browsing, image IO, label IO, schema normalization (parse/serialize round-trip), class management, and VOC/YOLO export. The op_handlers are pure async MoonBit functions and can be wired into any IPC layer (Proton/CEF, stdio JSON-RPC, HTTP, WASM, custom bridge). Includes a `dispatch_op(op, payload) -> Json raise` entry point in 0.2.0+ for embedding outside the CEF runtime.
Dependencies
# From the project root:
moon update # sync moon.mod deps
proton_cli cef setup # download CEF runtime into .proton/runtimes/
cd frontend && npm install && cd .. # install Vite + frontend deps (one-time per clone)proton_cli build -- --release
# output: target/proton-dist/moonbit-labeler/moonbit-labeler.exeproton_cli package
# output: target/proton-dist/moonbit-labeler/moonbit-labeler.exe
# target/proton-dist/moonbit-labeler/moonbit-labeler.zip (or use the wrapper _build/package-app.bat — see AGENTS.md)moon test --target native # 38+1+1 = 40 unit + blackbox tests
node frontend/qa/webkit_picker_blackbox.test.mjs # 6 frontend blackbox tests# launch the packaged exe (it picks CEF mode if libcef.dll is present,
# --stdio mode if not — see _build/run.bat for the full wrapper):
_build/run.bat
# OR drive the labeler backend over JSON-RPC without launching CEF:
target/proton-dist/moonbit-labeler/moonbit-labeler.exe --stdio
# ...then send one JSON object per line on stdin, read responses on stdout.
# Wire format documented at the top of app/stdio_main.mbt and in the
# project README's "Stdio JSON-RPC bridge" section..
├── app/ # runnable entry (CEF + stdio)
├── extensions/labeler/ # 21 IPC ops + label/VOC/YOLO pipeline
├── frontend/ # Vite + vanilla-JS UI (built into the exe at pack time)
├── moon.mod # declares deps: proton@0.2.5, proton_contract@0.2.5, moonbit_image@0.3.4
├── proton.project.json # identifier, frontend, package (output dir, formats, version)
└── AGENTS.md # one-time setup + commands + smoke-test recipe (read first)pub fn dispatch_op(op : String, payload : Json) -> Json raisefn async_package_anchor() -> Bool raiseasync fn fs_package_anchor() -> Boolfn image_package_anchor() -> Boolfn labeler_package_anchor() -> Boolfn ref_package_anchor() -> BoolInstall
Download zipImage / video labeling backend for the MoonbitLabeler app: 21 async ops over @fs/@json for folder browsing, image IO, label IO, schema normalization (parse/serialize round-trip), class management, and VOC/YOLO export. The op_handlers are pure async MoonBit functions and can be wired into any IPC layer (Proton/CEF, stdio JSON-RPC, HTTP, WASM, custom bridge). Includes a `dispatch_op(op, payload) -> Json raise` entry point in 0.2.0+ for embedding outside the CEF runtime.
Dependencies