# LinuxCNC build source map This map records the source basis and boundaries for native, source-link, and WASM build entry points. It is a build-policy guard only; it must not add CNC behavior and must not expand the temporary smoke parser. ## LinuxCNC Source Basis - `src/emc/rs274ngc/Submakefile` defines `LIBRS274SRCS`, including `rs274ngc_pre.cc`, and links RS274 against LinuxCNC INI, HAL, Python plugin, and tooldata libraries. - `src/emc/tooldata/Submakefile` defines the LinuxCNC tooldata common, mmap, NML, database, reader, and watcher sources tracked by native and WASM manifests. - `src/emc/ini/Submakefile` defines `liblinuxcncini` and exported INI headers used by source-linked and WASM-safe probes. - `src/emc/pythonplugin/Submakefile` defines `libpyplugin`, which remains a source-tracked Python/remap dependency for source-link and WASM blocker coverage. - `src/emc/kinematics/Submakefile` and `src/emc/kinematics/kinematics.h` define the kinematics source/header surface consumed by switchkins and RTCP build coverage. ## Build Coverage | Entry | Boundary | | --- | --- | | `test-native.sh` | Runs source-map guards, cached manifest checks, native bridge/API/RS274 probes, and Node/browser smoke after LinuxCNC source-backed native coverage. | | `test-linuxcnc-source-link.sh` | Compiles manifest-selected LinuxCNC RS274 objects directly with source-link support objects and project dump bridges. | | `test-linuxcnc-source-syntax.sh` | Keeps native source syntax validation on persistent dependency-tracked stamps. | | `test-linuxcnc-wasm-cmake-safe-probe.sh` | Configures source-backed WASM-safe probe targets with persistent CMake signatures. | | `build-wasm.sh` | Runs source-map guards, blocker, syntax, object, CMake, tooldata, interp, Python, `rs274ngc_pre`, and runtime probes before copying browser artifacts. | ## Boundaries - Default WASM manifest partition must remain 26 wasm-safe `core` sources and 9 `blocked` sources. - Build paths must keep `CNC_SIM_BUILD_JOBS` as scheduling only. Persistent object/configure signatures must not include it. - Hot object probes must use explicit `BUILD_RULE_VERSION` or `CONFIGURE_RULE_VERSION` fields instead of hashing whole scripts. - `build-wasm.sh` must configure with `CNC_SIM_ENABLE_SMOKE_BACKEND=OFF` and `CNC_SIM_ENABLE_LINUXCNC_WASM_SAFE_PROBE=ON`. - `build-wasm.sh` must run the same source-map guards as native and source-link entry points before consuming generated config aliases or browser artifacts. - `build-wasm.sh` must build `cnc_sim_wasm_runtime_probe` before `cnc_sim_wasm`, copy `cnc_sim.js` and `cnc_sim.wasm` exactly once, compare copied artifacts with `cmp -s`, and run Node smoke before browser smoke. - Build directory overrides must be non-empty, whitespace-free, and outside the filesystem root. ## Checks Run: ```bash ./check-linuxcnc-build-source-map.sh ./test-native.sh ./test-linuxcnc-source-link.sh ``` `check-linuxcnc-build-source-map.sh` keeps this document, LinuxCNC build-source anchors, manifest partition assumptions, build script ordering, and source-backed build-policy boundaries synchronized.