Skip to content

Moonlet ​

Lua runtime with plugin system for the rhi ecosystem.

Status: Fleshed Out ◐

Modular plugin architecture with 8 working integrations (fs, libm, normalize, packages, sessions, tools, llm, embed). Feature-complete for core mission (multi-provider LLM client + Lua runtime). One architectural task remaining: abstract LLM APIs to reduce rig coupling.

Repository: github.com/rhi-zone/moonlet

Overview ​

Moonlet provides a Lua execution environment with integrations for other rhi projects:

  • Lua runtime - mlua-based execution environment with plugin architecture
  • Integrations - Domain-specific Lua APIs via the Integration trait

Crates ​

CrateDescription
moonlet-coreCore runtime infrastructure
moonlet-luaLua runtime with Integration trait

Integrations ​

CrateDescription
moonlet-embedEmbedding generation
moonlet-fsFilesystem with capability-based security
moonlet-libsqlLibSQL/SQLite with vector support
moonlet-llmLLM client APIs
moonlet-normalizeNormalize code analysis
moonlet-packagesPackage management
moonlet-sessionsSession log parsing
moonlet-toolsExternal tools integration

Usage ​

rust
use moonlet_lua::Runtime;
use moonlet_normalize::NormalizeIntegration;

let runtime = Runtime::new()?;
runtime.register(&NormalizeIntegration::new("."))?;
runtime.run_file(Path::new("scripts/analyze.lua"))?;
  • Normalize - Code analysis integration via moonlet-normalize
  • Zone - Lua projects that run on Moonlet
  • Server-Less - Derive macros for server setup