每日 Harness 开源 · Source
返回本期 · Back to 2026-07-20

开源 / 项目 · Projects2026-07-20 · Monday, July 20, 2026

Subrust, a no_std, no alloc Subset-of-Rust interpreter

github.com原文 ↗

Subrust, a no_std, no alloc Subset-of-Rust interpreter
subrust 0.1.0 是一个无依赖、`no_std`、no-alloc、`forbid(unsafe_code)` 的 Rust 子集解释器,面向嵌入式、bare-metal 和 air-gapped 可编辑脚本。docs.rs 摘要写得很硬:每个被接受的程序都是有效 Rust,并且用两条差分规则验证,能被 `rustc` 编译,debug 语义下结果相同。脚本通过 host functions 与外部交互,运行时有 fuel、调用深度和内存上限;bootstrap 路径还提到可从 229-byte hex0 seed 离线重建。它把“嵌入式脚本语言”做成 Rust 语义的严格子集,降低了再造一门小语言时常见的语义漂移。
浏览

评论 · Comments