推进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:
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
struct _object;
|
||||
typedef _object PyObject;
|
||||
9
wasm-port/runtime/core/shims/boost/python/object_fwd.hpp
Normal file
9
wasm-port/runtime/core/shims/boost/python/object_fwd.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
namespace boost {
|
||||
namespace python {
|
||||
|
||||
class object {};
|
||||
|
||||
} // namespace python
|
||||
} // namespace boost
|
||||
3
wasm-port/runtime/core/shims/config.h
Normal file
3
wasm-port/runtime/core/shims/config.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define PACKAGE_VERSION "2.10.0~pre1"
|
||||
7
wasm-port/runtime/core/shims/fmt/format.h
Normal file
7
wasm-port/runtime/core/shims/fmt/format.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <format>
|
||||
|
||||
namespace fmt {
|
||||
using std::format;
|
||||
}
|
||||
7
wasm-port/runtime/core/shims/nml_intf/emc.hh
Normal file
7
wasm-port/runtime/core/shims/nml_intf/emc.hh
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// Minimal shim for the standalone INI parser build.
|
||||
enum EmcJointType : int {
|
||||
EMC_LINEAR = 1,
|
||||
EMC_ANGULAR = 2,
|
||||
};
|
||||
13
wasm-port/runtime/core/shims/pythonplugin/python_plugin.hh
Normal file
13
wasm-port/runtime/core/shims/pythonplugin/python_plugin.hh
Normal 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;
|
||||
}
|
||||
};
|
||||
67
wasm-port/runtime/core/shims/rtapi.h
Normal file
67
wasm-port/runtime/core/shims/rtapi.h
Normal 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
|
||||
5
wasm-port/runtime/core/shims/tooldata/tooldata.hh
Normal file
5
wasm-port/runtime/core/shims/tooldata/tooldata.hh
Normal 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.
|
||||
Reference in New Issue
Block a user