任务引擎虚拟机——用于执行指令的任务(进度更新)
2 分•作者: tracyspacy•3 天前
核心理念是:最小任务模型 + 可编程行为——一个小的核心实现无限的功能,因为每个任务都可以携带可执行脚本。
近期更新:
* 虚拟机现在使用 NaN-boxing 技术。
* 所有栈值都是 64 位 (u64),但编码了 5 种不同的类型:布尔值、字符串、CallData、U32 和 MemSlice(25 位偏移量 + 25 位大小)。
* 添加了 InlineVec——一种由固定大小数组支持的类似向量的结构。虚拟机栈、控制栈、调用栈和跳转栈现在都使用它,并有明确的限制。
* 虚拟机现在有内存(堆)。内存是简单的 Vec<u64>,动态增长,但从技术上讲,长度受 mem\_slice\_val 格式的限制:25 位有效载荷用于偏移量和大小。
该项目仍处于绝对的早期阶段。
代码仓库在这里:https://github.com/tracyspacy/spacydo
查看原文
The core idea is Minimal task model + programmable behaviour — a small core that enables unlimited features, since each task can carry executable scripts.<p>Recent updates:<p>- VM now uses NaN-boxing technique.<p>- All stack values are 64-bit (u64) but encode 5 distinct types:
Boolean, String, CallData, U32, and MemSlice (25-bit offset + 25-bit size).<p>- Added InlineVec — a vector-like structure backed by a fixed-size array. The VM stack, control stack, call stack, and jump stack now use it with defined limits.
- VM has memory now (heap). Memory is simple Vec<u64>, grows dynamically, but technically length is restricted by mem_slice_val format: 25 bits payload for offset and size<p>Project is still in absolutely early stage.<p>Repo is here: https://github.com/tracyspacy/spacydo