参考所有分组,完成尽量多的内容

结论:source-map纳入WASM-safe core和blocked源清单,并由聚合守护比对linuxcnc-rs274-wasm-source-files.txt,防止WASM源码链接文档与manifest漂移。
This commit is contained in:
cnc
2026-06-04 06:11:41 +08:00
parent 002c8a2d53
commit f9ac38251b
2 changed files with 94 additions and 0 deletions

View File

@@ -60,6 +60,54 @@ These are not needed for the browser simulator ABI and should not be part of the
- `pyinterp1.cc`
- `pyparamclass.cc`
### WASM-safe source core
These are the LinuxCNC source files compiled by the browser-safe source-link
probes from `linuxcnc-rs274-wasm-source-files.txt`:
- `src/emc/rs274ngc/interp_arc.cc`
- `src/emc/rs274ngc/interp_array.cc`
- `src/emc/rs274ngc/interp_base.cc`
- `src/emc/rs274ngc/interp_check.cc`
- `src/emc/rs274ngc/interp_convert.cc`
- `src/emc/rs274ngc/interp_cycles.cc`
- `src/emc/rs274ngc/interp_execute.cc`
- `src/emc/rs274ngc/interp_find.cc`
- `src/emc/rs274ngc/interp_g7x.cc`
- `src/emc/rs274ngc/interp_inspection.cc`
- `src/emc/rs274ngc/interp_internal.cc`
- `src/emc/rs274ngc/interp_inverse.cc`
- `src/emc/rs274ngc/interp_queue.cc`
- `src/emc/rs274ngc/interp_read.cc`
- `src/emc/rs274ngc/interp_setup.cc`
- `src/emc/rs274ngc/interp_write.cc`
- `src/emc/rs274ngc/modal_state.cc`
- `src/emc/rs274ngc/nurbs_additional_functions.cc`
- `src/emc/rs274ngc/interp_namedparams.cc`
- `src/emc/rs274ngc/interp_o_word.cc`
- `src/emc/rs274ngc/interp_python.cc`
- `src/emc/rs274ngc/interp_remap.cc`
- `src/emc/rs274ngc/rs274ngc_pre.cc`
- `src/emc/tooldata/tooldata_common.cc`
- `src/emc/ini/inifile.cc`
- `src/emc/nml_intf/emcops.cc`
### WASM-blocked sources
These LinuxCNC sources remain tracked in the wasm manifest, but are not part of
the browser-safe core until their Python/Boost.Python or native storage
dependencies are replaced:
- `src/emc/tooldata/tooldata_mmap.cc`
- `src/emc/rs274ngc/canonmodule.cc`
- `src/emc/rs274ngc/gcodemodule.cc`
- `src/emc/rs274ngc/interpmodule.cc`
- `src/emc/rs274ngc/pyarrays.cc`
- `src/emc/rs274ngc/pyblock.cc`
- `src/emc/rs274ngc/pyemctypes.cc`
- `src/emc/rs274ngc/pyinterp1.cc`
- `src/emc/rs274ngc/pyparamclass.cc`
### Browser-hostile dependencies to replace
- Python/Boost.Python remap and named parameter hooks.

View File

@@ -843,27 +843,65 @@ manifest_bindings = [
for line in Path("linuxcnc-rs274-source-files.txt").read_text(encoding="utf-8").splitlines()
if line.startswith("binding:")
]
wasm_manifest_core = [
line.split(":", 2)[1]
for line in Path("linuxcnc-rs274-wasm-source-files.txt").read_text(encoding="utf-8").splitlines()
if line.startswith("core:")
]
wasm_manifest_blocked = [
line.split(":", 2)[1]
for line in Path("linuxcnc-rs274-wasm-source-files.txt").read_text(encoding="utf-8").splitlines()
if line.startswith("blocked:")
]
source_map_core = []
source_map_bindings = []
source_map_wasm_core = []
source_map_wasm_blocked = []
in_core_section = False
in_binding_section = False
in_wasm_core_section = False
in_wasm_blocked_section = False
for line in source_map.splitlines():
if line == "### Interpreter core":
in_core_section = True
in_binding_section = False
in_wasm_core_section = False
in_wasm_blocked_section = False
continue
if line == "### Python binding modules":
in_core_section = False
in_binding_section = True
in_wasm_core_section = False
in_wasm_blocked_section = False
continue
if line == "### WASM-safe source core":
in_core_section = False
in_binding_section = False
in_wasm_core_section = True
in_wasm_blocked_section = False
continue
if line == "### WASM-blocked sources":
in_core_section = False
in_binding_section = False
in_wasm_core_section = False
in_wasm_blocked_section = True
continue
if in_core_section and line.startswith("### "):
break
if in_binding_section and line.startswith("### "):
in_binding_section = False
if in_wasm_core_section and line.startswith("### "):
in_wasm_core_section = False
if in_wasm_blocked_section and line.startswith("### "):
in_wasm_blocked_section = False
if in_core_section and line.startswith("- `"):
source_map_core.append(line.split("`", 2)[1])
if in_binding_section and line.startswith("- `"):
source_map_bindings.append(line.split("`", 2)[1])
if in_wasm_core_section and line.startswith("- `"):
source_map_wasm_core.append(line.split("`", 2)[1])
if in_wasm_blocked_section and line.startswith("- `"):
source_map_wasm_blocked.append(line.split("`", 2)[1])
if source_map_core != manifest_core:
raise SystemExit(
"docs/linuxcnc-rs274-source-map.md interpreter core list no longer matches linuxcnc-rs274-source-files.txt core manifest"
@@ -872,6 +910,14 @@ if source_map_bindings != manifest_bindings:
raise SystemExit(
"docs/linuxcnc-rs274-source-map.md Python binding module list no longer matches linuxcnc-rs274-source-files.txt binding manifest"
)
if source_map_wasm_core != wasm_manifest_core:
raise SystemExit(
"docs/linuxcnc-rs274-source-map.md WASM-safe source core list no longer matches linuxcnc-rs274-wasm-source-files.txt core manifest"
)
if source_map_wasm_blocked != wasm_manifest_blocked:
raise SystemExit(
"docs/linuxcnc-rs274-source-map.md WASM-blocked source list no longer matches linuxcnc-rs274-wasm-source-files.txt blocked manifest"
)
PY
for script in \