Expand description
In-engine debug console with command registration, tab completion, and history.
The console renders as an overlay on top of the scene using glyph rendering. It supports:
- Command registration with argument schemas and help text
- Tab completion for commands and arguments
- Command history (up/down arrow navigation)
- Built-in commands: help, list, set, get, clear, echo, quit, reload, time, fps
- Structured output log with severity levels and scroll
- Lua-style expression evaluation stubs for future scripting integration
§Quick Start
use proof_engine::debug::console::Console;
let mut console = Console::new();
console.register_command(proof_engine::debug::console::Command {
name: "say".to_owned(),
help: "Print a message".to_owned(),
args: vec![proof_engine::debug::console::ArgSpec::required("text")],
handler: Box::new(|args, out| {
out.push(proof_engine::debug::console::LogLine::info(args.join(" ")));
}),
});
console.submit("say hello world");Structs§
- ArgSpec
- Command
- Completion
Result - Console
- Console
Sink - A lightweight handle for writing to the console from other systems. Clone it and pass it around; it queues lines to be pushed on the next tick.
- LogLine
Enums§
- Console
Action - Returned by submit() to signal special engine actions.
- LogLevel