推进LinuxCNC WASM最小解释器验证

结论:新增独立 wasm-port 工作区,修复 native probes include 路径,最小解释器 harness 已可验证 G0 直线快速、G1 进给和 SET_FEED_RATE canonical event。检查:git diff --check 通过;wasm-port/tests/native/verify_native_probes.sh 通过。
This commit is contained in:
cnc
2026-06-06 22:26:27 +08:00
parent a03f27d12c
commit a0810b8598
82 changed files with 33282 additions and 0 deletions

View File

@@ -0,0 +1 @@
#pragma once

View File

@@ -0,0 +1 @@
#pragma once

View File

@@ -0,0 +1,4 @@
#pragma once
struct _object;
typedef _object PyObject;

View File

@@ -0,0 +1,9 @@
#pragma once
namespace boost {
namespace python {
class object {};
} // namespace python
} // namespace boost

View File

@@ -0,0 +1,3 @@
#pragma once
#define PACKAGE_VERSION "2.10.0~pre1"

View File

@@ -0,0 +1,7 @@
#pragma once
#include <format>
namespace fmt {
using std::format;
}

View File

@@ -0,0 +1,7 @@
#pragma once
// Minimal shim for the standalone INI parser build.
enum EmcJointType : int {
EMC_LINEAR = 1,
EMC_ANGULAR = 2,
};

View File

@@ -0,0 +1,13 @@
#pragma once
#include <string>
class PythonPlugin {
public:
bool usable() const { return false; }
int plugin_status() const { return 0; }
const std::string &last_exception() const {
static std::string empty;
return empty;
}
};

View File

@@ -0,0 +1,67 @@
#pragma once
#include <cstdarg>
#include <cstdio>
#include <cstring>
#include <cstddef>
#ifndef RTAPI_BEGIN_DECLS
#ifdef __cplusplus
#define RTAPI_BEGIN_DECLS extern "C" {
#define RTAPI_END_DECLS }
#else
#define RTAPI_BEGIN_DECLS
#define RTAPI_END_DECLS
#endif
#endif
#ifndef RTAPI_NAME_LEN
#define RTAPI_NAME_LEN 31
#endif
typedef enum {
RTAPI_MSG_NONE = 0,
RTAPI_MSG_ERR,
RTAPI_MSG_WARN,
RTAPI_MSG_INFO,
RTAPI_MSG_DBG,
RTAPI_MSG_ALL
} msg_level_t;
RTAPI_BEGIN_DECLS
static inline int rtapi_snprintf(char *buf, unsigned long size, const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
int rc = vsnprintf(buf, static_cast<size_t>(size), fmt, ap);
va_end(ap);
return rc;
}
static inline int rtapi_vsnprintf(char *buf, unsigned long size, const char *fmt, va_list ap) {
return vsnprintf(buf, static_cast<size_t>(size), fmt, ap);
}
static inline void rtapi_print(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
}
static inline void rtapi_print_msg(msg_level_t, const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
}
static inline int rtapi_set_msg_level(int) {
return 0;
}
static inline int rtapi_get_msg_level(void) {
return RTAPI_MSG_ALL;
}
RTAPI_END_DECLS

View File

@@ -0,0 +1,5 @@
#pragma once
// Standalone header-only compile probe shim.
// The rs274ngc header path only needs this include to exist so that the
// interpreter state types can be parsed without pulling in full tooldata/NML.