2.5 KiB
2.5 KiB
LinuxCNC browser app source map
This map records the source basis and boundaries for the browser application entry point. It is an app/bridge guard only; it must not add CNC behavior and must not expand the temporary smoke parser.
LinuxCNC Source Basis
src/emc/rs274ngc/interp_internal.hhdefinesRS274NGC_PARAMETER_FILE_NAME_DEFAULTasrs274ngc.var.src/emc/rs274ngc/interp_internal.hhdefinesRS274NGC_PARAMETER_FILE_BACKUP_SUFFIXas.bak.src/emc/rs274ngc/rs274ngc_pre.ccrestores parameter files throughInterp::restore_parameters().src/emc/rs274ngc/rs274ngc_pre.ccsaves parameter files throughInterp::save_parameters(), includingfilename + ".new"andfilename + ".bak"behavior.src/emc/rs274ngc/rs274ngc_pre.ccorders parameter saves as backup unlink, backup link, then temporary-file rename.src/emc/rs274ngc/rs274ngc_pre.ccreads program blocks throughread_text()after the browser bridge mirrors the OPFS program into the WASM filesystem.
App Coverage
| Entry | Boundary |
|---|---|
web/index.html |
Loads the browser app module and exposes only the LinuxCNC backend selector. |
web/src/app.js |
Creates a required OPFS-backed simulator workspace and parses browser programs with a LinuxCNC parameter file. |
web/test-browser-wasm-smoke-app-sections.js |
Verifies app-level OPFS program save, parameter save, parameter backup, and reload behavior. |
Boundaries
- The app must use the existing
createWasmSimulator()OPFS API; it must not add browser filesystem persistence outside OPFS. - The app must persist the current program at
programs/current.ngc. - The app must persist LinuxCNC parameter state at
parameters/rs274ngc.var. - The app must require OPFS for browser program parsing and call
parseFileWithParameterFile(programPath, parameterPath, "linuxcnc", ...). - The visible backend selector must stay limited to the LinuxCNC RS274 backend.
test-native.sh,test-linuxcnc-source-link.sh, andbuild-wasm.shmust run./check-linuxcnc-browser-app-source-map.shbefore consuming app-backed browser artifacts or source-linked LinuxCNC objects.- The browser app source-map guard validates LinuxCNC source-backed bridge routing and OPFS policy only; it does not interpret G-code.
Checks
Run:
./check-linuxcnc-browser-app-source-map.sh
./test-native.sh
./test-linuxcnc-source-link.sh
./build-wasm.sh
check-linuxcnc-browser-app-source-map.sh keeps this document, LinuxCNC source
anchors, app OPFS paths, app parse routing, and app smoke coverage synchronized.