diff --git a/core/wasm_shims/tooldata/tooldata.hh b/core/wasm_shims/tooldata/tooldata.hh index d27bad8..1aae5b3 100644 --- a/core/wasm_shims/tooldata/tooldata.hh +++ b/core/wasm_shims/tooldata/tooldata.hh @@ -3,6 +3,8 @@ #include "nml_intf/canon.hh" #include "nml_intf/emc_nml.hh" +// LinuxCNC source basis: src/emc/tooldata/tooldata.hh declares the tooldata +// API used by taskclass.cc, emccanon.cc, and RS274 tool table paths. extern "C" { typedef enum { diff --git a/core/wasm_shims/tooldata/tooldata_mmap_backend.cc b/core/wasm_shims/tooldata/tooldata_mmap_backend.cc index bc3220e..37dbcd9 100644 --- a/core/wasm_shims/tooldata/tooldata_mmap_backend.cc +++ b/core/wasm_shims/tooldata/tooldata_mmap_backend.cc @@ -4,6 +4,9 @@ #include #include +// LinuxCNC source basis: src/emc/tooldata/tooldata_mmap.cc provides these +// tool_mmap and indexed tool table entry points; this shim keeps them +// available for WASM without native mmap. namespace { CANON_TOOL_TABLE tool_table[CANON_POCKETS_MAX]; diff --git a/core/wasm_shims/tooldata/tooldata_runtime_stubs.cc b/core/wasm_shims/tooldata/tooldata_runtime_stubs.cc index 7ef3644..e2be052 100644 --- a/core/wasm_shims/tooldata/tooldata_runtime_stubs.cc +++ b/core/wasm_shims/tooldata/tooldata_runtime_stubs.cc @@ -3,6 +3,8 @@ #include #include +// LinuxCNC source basis: src/emc/tooldata/tooldata_nml.cc and tooldata_db.cc +// provide the NML registration and external tool database entry points. namespace { constexpr int MAX_DB_PROGRAM_ARGS = 10; diff --git a/test-linuxcnc-wasm-cmake-safe-probe.sh b/test-linuxcnc-wasm-cmake-safe-probe.sh index 5e26399..e648929 100755 --- a/test-linuxcnc-wasm-cmake-safe-probe.sh +++ b/test-linuxcnc-wasm-cmake-safe-probe.sh @@ -918,6 +918,9 @@ tooldata_mmap_backend_shim=$(./list-linuxcnc-wasm-safe-shims.sh tooldata_mmap_ba grep -Fx "core/wasm_shims/tooldata/tooldata_mmap_backend.cc" <<<"$tooldata_mmap_backend_shim" >/dev/null tooldata_runtime_stubs_shim=$(./list-linuxcnc-wasm-safe-shims.sh tooldata_runtime_stubs.cc) grep -Fx "core/wasm_shims/tooldata/tooldata_runtime_stubs.cc" <<<"$tooldata_runtime_stubs_shim" >/dev/null +grep -F 'LinuxCNC source basis: src/emc/tooldata/tooldata.hh declares the tooldata' core/wasm_shims/tooldata/tooldata.hh >/dev/null +grep -F 'LinuxCNC source basis: src/emc/tooldata/tooldata_mmap.cc provides these' core/wasm_shims/tooldata/tooldata_mmap_backend.cc >/dev/null +grep -F 'LinuxCNC source basis: src/emc/tooldata/tooldata_nml.cc and tooldata_db.cc' core/wasm_shims/tooldata/tooldata_runtime_stubs.cc >/dev/null wasm_bridge_source=$(./list-linuxcnc-wasm-safe-project-sources.sh linuxcnc_canon_bridge.cpp) grep -Fx "core/src/linuxcnc_canon_bridge.cpp" <<<"$wasm_bridge_source" >/dev/null missing_shim_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_missing_wasm_safe_shim.XXXXXX.log")