新增解释器核心WASM验证
结论:已建立基于LinuxCNC解释器源码的最小WASM核心构建和minimal_linear夹具验证,并接入host smoke。
This commit is contained in:
@@ -18,6 +18,12 @@ The current WASM smoke validation command is:
|
||||
wasm-port/tests/wasm/node/verify_ini_wasm.sh
|
||||
```
|
||||
|
||||
The current WASM interpreter-core smoke validation command is:
|
||||
|
||||
```bash
|
||||
wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||||
```
|
||||
|
||||
The current OPFS host-boundary validation command is:
|
||||
|
||||
```bash
|
||||
@@ -64,6 +70,13 @@ The WASM INI smoke script builds `runtime/ui/ini-panel/linuxcnc_ini.js` and
|
||||
module through `runtime/sdk/src/linuxcnc-ini.js` in Node and verifies INI
|
||||
queries against a file written to the Emscripten filesystem.
|
||||
|
||||
The WASM interpreter-core smoke script builds
|
||||
`build/wasm/core/linuxcnc_interp.js` and `linuxcnc_interp.wasm` from the same
|
||||
vendored LinuxCNC interpreter source set used by the native minimal
|
||||
interpreter harness. It loads the module in Node, runs the `minimal_linear`
|
||||
G-code fixture through `Interp::execute()`, and compares emitted canonical
|
||||
events with `tests/fixtures/canon/minimal_linear.events`.
|
||||
|
||||
The OPFS host-boundary script validates the JavaScript file-service adapter
|
||||
with a Node mock of the browser File System Access handles. It covers nested
|
||||
directory creation, text save/load, missing file behavior, invalid relative
|
||||
@@ -129,9 +142,10 @@ The validation fails if:
|
||||
| Harness | Purpose |
|
||||
| --- | --- |
|
||||
| `tests/wasm/node/verify_ini_wasm.sh` | Validates the browser-facing INI WASM module can be built from vendored LinuxCNC `inifile.cc`, loaded through the JS SDK in Node, and queried through the exported C ABI. |
|
||||
| `tests/wasm/node/verify_interp_wasm.sh` | Validates the initial interpreter-core WASM module can be built from vendored LinuxCNC interpreter source, run `minimal_linear.ngc` through `Interp::execute()`, and match the native canonical event fixture. |
|
||||
| `tests/opfs/node/verify_file_service.sh` | Validates the host-owned OPFS text-file adapter, path model, session snapshot store, machine file store, and G-code text store used by the browser INI panel without moving file persistence into the WASM core. |
|
||||
| `tests/browser/verify_ini_panel_browser.sh` | Validates the INI SDK, WASM module loading, OPFS text-file round trip, generic session snapshot round trip, machine file text round trip, and G-code text round trip in a real browser runtime. |
|
||||
| `tests/host/verify_host_smokes.sh` | Runs the current host-side Node, WASM, OPFS, and browser smoke validation with a single INI WASM build. |
|
||||
| `tests/host/verify_host_smokes.sh` | Runs the current host-side Node, WASM interpreter-core, OPFS, and browser smoke validation with shared WASM builds. |
|
||||
|
||||
## Fixture Coverage
|
||||
|
||||
@@ -174,8 +188,9 @@ Negative fixtures currently cover:
|
||||
|
||||
## Validation Boundaries
|
||||
|
||||
Current full-core validation is native-only. WASM/SDK validation is limited to
|
||||
the INI parser smoke harness. OPFS validation is limited to the JavaScript
|
||||
Current full-core validation is native-only. WASM/SDK validation covers the
|
||||
INI parser smoke harness and an initial interpreter-core canonical event smoke
|
||||
for `minimal_linear`. OPFS validation is limited to the JavaScript
|
||||
host-boundary adapter plus the INI browser smoke harness. Full browser
|
||||
coverage, full SDK coverage, and full machine-session validation remain future
|
||||
work.
|
||||
|
||||
Reference in New Issue
Block a user