结论:补齐 LinuxCNC tooldata 源映射 guard,并接入 native/source-link/workstreams 检查;仅验证源覆盖、WASM-safe shim/probe 边界和 TOOL_TABLE source-only 策略,未扩展 smoke 行为。\n\n测试:./check-linuxcnc-tooldata-source-map.sh;./check-linuxcnc-workstreams-source-map.sh;git diff --check;./test-native.sh;./test-linuxcnc-source-link.sh。
3.2 KiB
3.2 KiB
LinuxCNC tooldata source map
This map records the source basis and boundaries for LinuxCNC tooldata coverage in native, source-link, switchkins, and WASM-safe build paths. It is a source-link/shim guard only; it must not add CNC behavior and must not expand the temporary smoke parser.
LinuxCNC Source Basis
src/emc/tooldata/Submakefileselectstooldata_mmap.ccortooldata_nml.cc, and always includestooldata_common.cc,tooldata_db.cc, andtool_watch.cc.src/emc/tooldata/tooldata_common.ccprovides tool table parsing, formatting, load/save, and database-mode entry points.src/emc/tooldata/tooldata_mmap.ccprovides native mmap tool table storage.src/emc/tooldata/tooldata_nml.ccprovides the NML tool table registration backend selected byTOOL_NML_FLAG.src/emc/tooldata/tooldata_db.ccprovides external database entry points.src/emc/tooldata/tool_mmap_read.ccandsrc/emc/tooldata/tool_watch.ccare utility sources from the same LinuxCNC tooldata build metadata.src/emc/tooldata/tooldata.hhdeclares the tooldata API used by RS274 and WASM-safe shims.
Manifest And Shim Coverage
| Coverage | Boundary |
|---|---|
linuxcnc-rs274-source-files.txt |
Tracks the full LinuxCNC src/emc/tooldata source directory and tooldata.hh. |
linuxcnc-rs274-wasm-source-files.txt |
Links tooldata_common.cc, blocks native tooldata_mmap.cc, and records runtime shim source bases for tooldata_db.cc and tooldata_nml.cc. |
linuxcnc-kinematics-source-files.txt |
Tracks 10 LinuxCNC TOOL_TABLE files referenced by covered M428/M429/M430 INI sources as tooldata source coverage only. |
core/wasm_shims/tooldata/tooldata_mmap_backend.cc |
Adapts LinuxCNC tooldata_mmap.cc exports to WASM-safe in-memory storage. |
core/wasm_shims/tooldata/tooldata_runtime_stubs.cc |
Adapts LinuxCNC tooldata_nml.cc and tooldata_db.cc runtime entry points without native services. |
test-linuxcnc-wasm-tooldata-link.sh |
Links the wasm-safe tooldata shim against LinuxCNC tooldata runtime expectations. |
test-linuxcnc-wasm-tooldata-common-link.sh |
Links LinuxCNC tooldata_common.cc through the wasm-safe standalone probe. |
test-linuxcnc-wasm-tooldata-mmap-symbols.sh |
Compares wasm mmap backend exports with LinuxCNC tooldata_mmap.cc. |
test-linuxcnc-wasm-tooldata-runtime-symbols.sh |
Compares runtime stub exports with LinuxCNC tooldata_db.cc and tooldata_nml.cc. |
Boundaries
- Tool table files referenced by switchkins INI files are source coverage only; they must not become browser API fields or generated switchkins aliases.
- WASM-safe tooldata shims must preserve the LinuxCNC export surface checked by symbol probes.
- Native and source-link paths must keep the full LinuxCNC
src/emc/tooldatasource directory tracked in the native RS274 manifest. build-wasm.shmust run tooldata link and symbol probes before copying browser artifacts.
Checks
Run:
./check-linuxcnc-tooldata-source-map.sh
./test-native.sh
./test-linuxcnc-source-link.sh
check-linuxcnc-tooldata-source-map.sh keeps this document, LinuxCNC tooldata
source anchors, manifest coverage, WASM shim/probe boundaries, and switchkins
TOOL_TABLE source-only policy synchronized.