参考所有分组,完成尽量多的内容:收紧RS274 source-map边界守卫

This commit is contained in:
cnc
2026-06-05 06:48:36 +08:00
parent 9c52e426f7
commit fb2b5c4920
2 changed files with 54 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
# LinuxCNC rs274 source map
This is the working map for moving from native `librs274` linking to source-level compilation and then to wasm.
This is the working map for moving from native `librs274` linking to
source-level compilation and then to wasm. It is a source-manifest guard only;
it must not add CNC behavior and must not expand the temporary smoke parser.
## Compile assumptions
@@ -176,6 +178,33 @@ the browser-safe shims and manifest completeness checks:
- persistent parameter file writes.
- dynamic INI/HAL queries.
## Boundaries
- Native and WASM source lists in this document must match
`linuxcnc-rs274-source-files.txt` and
`linuxcnc-rs274-wasm-source-files.txt` exactly.
- Python binding modules, WASM-blocked sources, and WASM-blocked headers are
source coverage only.
- They must not become browser API fields or temporary smoke parser fallback behavior.
- Browser-hostile dependencies must remain tracked blockers until they are
ported, trimmed, wrapped, or replaced by source-backed browser-safe LinuxCNC
adaptations.
- `test-native.sh`, `test-linuxcnc-source-link.sh`, and `build-wasm.sh` must
run `./check-linuxcnc-rs274-source-map.sh` before consuming generated native
objects, source-linked LinuxCNC objects, or browser artifacts.
- The RS274 source-map guard validates LinuxCNC source ownership and manifest
drift only; it does not interpret G-code.
## Checks
Run:
```bash
./check-linuxcnc-rs274-source-map.sh
./test-native.sh
./test-linuxcnc-source-link.sh
```
The wasm-safe runtime now constructs its detached `EMC_STAT` through LinuxCNC
`src/emc/nml_intf/emcops.cc`. The singleton follows LinuxCNC
`src/emc/sai/dummyemcstat.cc`, and the required `NMLmsg`/`RCS_STAT_MSG`