转向直接移植LinuxCNC源程序
结论:明确禁止继续扩展自写 CNC 主体语义,最小 runtime 仅保留为迁移探针;新增 interp_convert.cc 源码直连编译探针,并以最小 emcStatus 状态边界 shim 暴露 native runtime 阻塞点。检查:git diff --check 通过;wasm-port/tests/native/verify_native_probes.sh 通过,linuxcnc_interp_convert_source_probe exitcode=0。
This commit is contained in:
@@ -19,6 +19,17 @@ Build a standalone CNC simulation system that:
|
||||
- does not drive real hardware;
|
||||
- preserves LinuxCNC software behavior as closely as practical.
|
||||
|
||||
## Current Direction
|
||||
|
||||
The migration target is the LinuxCNC source program itself, adapted to run as
|
||||
the standalone WASM simulation program. The project must not evolve a
|
||||
project-authored interpreter, planner, or CNC semantics layer now that the
|
||||
porting harness is running.
|
||||
|
||||
Existing minimal runtime wrappers are migration probes only. They are allowed
|
||||
to expose, compile, and validate vendored LinuxCNC code, but they must not be
|
||||
expanded into a separate implementation of G-code behavior.
|
||||
|
||||
## Repository Boundaries
|
||||
|
||||
1. `../linuxcnc/` is upstream and must be treated as read-only input for the
|
||||
@@ -33,21 +44,24 @@ Build a standalone CNC simulation system that:
|
||||
## Engineering Rules
|
||||
|
||||
1. Reuse LinuxCNC source before reimplementing any CNC logic.
|
||||
2. Prefer wrappers, shims, and extraction scripts over invasive source edits.
|
||||
3. Preserve LinuxCNC semantics for:
|
||||
2. 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:
|
||||
- G-code execution;
|
||||
- modal state;
|
||||
- parameter and variable behavior;
|
||||
- kinematics;
|
||||
- planner behavior;
|
||||
- machine and controller state visible to software.
|
||||
4. Replace only the native runtime edges:
|
||||
5. Replace only the native runtime edges:
|
||||
- file IO;
|
||||
- process model;
|
||||
- HAL runtime;
|
||||
- IPC;
|
||||
- GUI.
|
||||
5. Frontend code must be implemented with web technology, not migrated from
|
||||
6. Frontend code must be implemented with web technology, not migrated from
|
||||
native GUI code.
|
||||
|
||||
## Required Layout
|
||||
|
||||
Reference in New Issue
Block a user