command_core
A minimal, #![no_std]
-friendly function interpreter for mapping string commands to Rust functions using phf
.
Designed for embedded systems, game engines, scripting layers, or any environment where you want fast, compile-time command dispatch without heap allocations.
Features
#![no_std]
compatible — works in embedded and constrained environments.- Zero runtime hashing — powered by
phf
for perfect hash maps at compile time. - Immutable interpreter reference — allows recursive commands or conditional logic.
- Type-safe command functions — no dynamic typing or unsafe casting.
Example
use ;
// Example state struct
// Example command function
// Compile-time command map
static FUNCTION_MAP: Map = phf_map! ;