尽快推进:收紧WASM blocker参数文件源码锚点

This commit is contained in:
cnc
2026-06-05 08:38:29 +08:00
parent cf3154b043
commit 77e92b0116
3 changed files with 16 additions and 3 deletions

View File

@@ -8,8 +8,8 @@ cd "$(dirname "$0")"
# src/emc/rs274ngc/gcodemodule.cc, interp_namedparams.cc, interp_o_word.cc, # src/emc/rs274ngc/gcodemodule.cc, interp_namedparams.cc, interp_o_word.cc,
# and the py*.cc module bindings; tooldata/native-backend blockers come from # and the py*.cc module bindings; tooldata/native-backend blockers come from
# src/emc/tooldata/tooldata_mmap.cc and tooldata_db.cc; native filesystem # src/emc/tooldata/tooldata_mmap.cc and tooldata_db.cc; native filesystem
# blockers come from LinuxCNC RS274 sources such as interp_o_word.cc and # coverage comes from LinuxCNC RS274 sources such as interp_o_word.cc
# interp_write.cc. # directory traversal and rs274ngc_pre.cc parameter-file replacement.
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc} linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
manifest=${1:-linuxcnc-rs274-wasm-source-files.txt} manifest=${1:-linuxcnc-rs274-wasm-source-files.txt}

View File

@@ -30,6 +30,16 @@ grep -F '#include "pythonplugin/python_plugin.hh"' "$linuxcnc_root/src/emc/rs274
grep -F 'dlopen' "$linuxcnc_root/src/emc/rs274ngc/interp_base.cc" >/dev/null grep -F 'dlopen' "$linuxcnc_root/src/emc/rs274ngc/interp_base.cc" >/dev/null
grep -F 'opendir(direct)' "$linuxcnc_root/src/emc/rs274ngc/interp_o_word.cc" >/dev/null grep -F 'opendir(direct)' "$linuxcnc_root/src/emc/rs274ngc/interp_o_word.cc" >/dev/null
grep -F 'readdir(aDir)' "$linuxcnc_root/src/emc/rs274ngc/interp_o_word.cc" >/dev/null grep -F 'readdir(aDir)' "$linuxcnc_root/src/emc/rs274ngc/interp_o_word.cc" >/dev/null
grep -F 'std::string tempfile = std::string(filename) + ".new";' \
"$linuxcnc_root/src/emc/rs274ngc/rs274ngc_pre.cc" >/dev/null
grep -F '+ RS274NGC_PARAMETER_FILE_BACKUP_SUFFIX;' \
"$linuxcnc_root/src/emc/rs274ngc/rs274ngc_pre.cc" >/dev/null
grep -F 'unlink(bakfile.c_str());' \
"$linuxcnc_root/src/emc/rs274ngc/rs274ngc_pre.cc" >/dev/null
grep -F 'if(link(filename, bakfile.c_str()) < 0)' \
"$linuxcnc_root/src/emc/rs274ngc/rs274ngc_pre.cc" >/dev/null
grep -F 'if(rename(tempfile.c_str(), filename) < 0)' \
"$linuxcnc_root/src/emc/rs274ngc/rs274ngc_pre.cc" >/dev/null
grep -F '#define TOOL_MMAP_FILENAME ".tool.mmap"' "$linuxcnc_root/src/emc/tooldata/tooldata_mmap.cc" >/dev/null grep -F '#define TOOL_MMAP_FILENAME ".tool.mmap"' "$linuxcnc_root/src/emc/tooldata/tooldata_mmap.cc" >/dev/null
grep -F 'int tool_mmap_creator(' "$linuxcnc_root/src/emc/tooldata/tooldata_mmap.cc" >/dev/null grep -F 'int tool_mmap_creator(' "$linuxcnc_root/src/emc/tooldata/tooldata_mmap.cc" >/dev/null
@@ -153,6 +163,8 @@ for phrase in [
"does not add CNC behavior", "does not add CNC behavior",
"must not become smoke parser behavior", "must not become smoke parser behavior",
"blocked `dlopen` and blocked tooldata-users remain empty", "blocked `dlopen` and blocked tooldata-users remain empty",
'parameter-file replacement through `filename + ".new"`',
"O-word lookup and parameter-file replacement",
"Python/Boost.Python remap paths remain tracked blockers", "Python/Boost.Python remap paths remain tracked blockers",
"./check-linuxcnc-wasm-blockers-source-map.sh", "./check-linuxcnc-wasm-blockers-source-map.sh",
"does not interpret G-code", "does not interpret G-code",

View File

@@ -18,6 +18,7 @@ a source-link/build guard only; it does not add CNC behavior and must not become
replaced by the wasm-safe tooldata mmap backend shim. replaced by the wasm-safe tooldata mmap backend shim.
- `src/emc/rs274ngc/interp_o_word.cc` uses native directory traversal for - `src/emc/rs274ngc/interp_o_word.cc` uses native directory traversal for
O-word subroutine lookup; browser persistence remains OPFS-only. O-word subroutine lookup; browser persistence remains OPFS-only.
- `src/emc/rs274ngc/rs274ngc_pre.cc` implements LinuxCNC parameter-file replacement through `filename + ".new"`, `filename + ".bak"`, `unlink`, `link`, and `rename`; browser persistence remains OPFS-only.
## Manifest Coverage ## Manifest Coverage
@@ -44,7 +45,7 @@ a source-link/build guard only; it does not add CNC behavior and must not become
| `core-dlopen-shimmed` | 1 | Core LinuxCNC `dlopen` user compiled with dlfcn shim. | | `core-dlopen-shimmed` | 1 | Core LinuxCNC `dlopen` user compiled with dlfcn shim. |
| `core-tooldata-shimmed` | 1 | Core LinuxCNC tooldata source compiled with wasm tooldata shims. | | `core-tooldata-shimmed` | 1 | Core LinuxCNC tooldata source compiled with wasm tooldata shims. |
| `core-tooldata-users-shimmed` | 2 | Core RS274/NML users of tooldata declarations. | | `core-tooldata-users-shimmed` | 2 | Core RS274/NML users of tooldata declarations. |
| `core-native-fs-shimmed` | 16 | Core sources with native filesystem includes or calls covered by WASM shims. | | `core-native-fs-shimmed` | 16 | Core sources with native filesystem includes or calls covered by WASM shims, including O-word lookup and parameter-file replacement. |
Required replacement set: Required replacement set: