Back to browse
GitHub Repository

Subrust is a no_std, no alloc, self-hosted embeddable Subset-of-Rust interpreter

0 starsRust

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

by makira·Jul 19, 2026·2 points·0 comments

AI Analysis

●●●BangerWizardryBig BrainNiche Gem

Guarantees interpreted scripts behave identically to rustc compilation with zero dependencies.

Strengths
  • Differential testing enforces L1/L2 laws: accepted code must compile and match rustc output exactly.
  • Bootstraps from a 229-byte seed and self-hosts, proving the minimal core is sufficient.
  • Resumable machine architecture suspends on host calls, giving embedders total control over effects.
Weaknesses
  • Supports only a strict subset of Rust, limiting utility for complex user-written logic.
  • Relies on LLMs to generate scripts since the subset syntax may be unfamiliar to humans.
Target Audience

Embedded systems engineers, kernel developers, and sandboxing architects

Similar To

Miri · Cranelift · Wasmtime

Post Description

I needed to run user scripts for an app, and decided to use a subset of Rust as the scripting language. I do not expect a typical user to write the script directly, a local LLM will handle it. The interpreter can be bootstrapped in a C-free path from a tiny 229 bytes seed, and self-hosts. The code was written by Claude Code (Fable/Opus) under my supervision, in a few days, which I found impressive.

Similar Projects