wasm-port: broaden native LinuxCNC interpreter probes

This commit is contained in:
2026-06-07 05:49:34 +08:00
parent 5025b0c1a1
commit eb261462c1
49 changed files with 1276 additions and 798 deletions

View File

@@ -13,6 +13,9 @@ This workspace is separate from the upstream LinuxCNC tree in
Build a standalone CNC simulation system that:
- reuses LinuxCNC source as the semantic source of truth;
- derives the CNC simulation program primarily from the LinuxCNC source
program and strictly follows LinuxCNC behavior, structure, and semantics
unless a documented standalone runtime boundary requires adaptation;
- compiles core CNC logic to WASM;
- uses HTML + JavaScript for the frontend;
- uses OPFS for browser persistence;
@@ -44,24 +47,28 @@ expanded into a separate implementation of G-code behavior.
## Engineering Rules
1. Reuse LinuxCNC source before reimplementing any CNC logic.
2. Do not add new project-authored CNC semantics when LinuxCNC source exists.
2. Treat the LinuxCNC source program as the primary implementation source for
the CNC simulation program. Standalone code must strictly follow vendored
LinuxCNC behavior and may only adapt runtime edges such as filesystem, HAL,
IPC, process model, and browser integration.
3. Do not add new project-authored CNC semantics when LinuxCNC source exists.
Replace temporary wrapper behavior with direct calls into vendored LinuxCNC
source, or with the narrowest shims needed to make those calls compile.
3. Prefer wrappers, shims, and extraction scripts over invasive source edits.
4. Preserve LinuxCNC semantics for:
4. Prefer wrappers, shims, and extraction scripts over invasive source edits.
5. Preserve LinuxCNC semantics for:
- G-code execution;
- modal state;
- parameter and variable behavior;
- kinematics;
- planner behavior;
- machine and controller state visible to software.
5. Replace only the native runtime edges:
6. Replace only the native runtime edges:
- file IO;
- process model;
- HAL runtime;
- IPC;
- GUI.
6. Frontend code must be implemented with web technology, not migrated from
7. Frontend code must be implemented with web technology, not migrated from
native GUI code.
## Required Layout