oxur-repl

Crates.iooxur-repl
lib.rsoxur-repl
version0.2.0
created_at2026-01-03 17:50:38.871944+00
updated_at2026-01-17 00:25:34.025603+00
descriptionOxur REPL: protocol, client, and server with tiered execution
homepage
repositoryhttps://github.com/oxur/oxur
max_upload_size
id2020520
size670,074
Duncan McGreggor (oubiwann)

documentation

README

oxur-repl

REPL implementation with three-tier execution for optimal performance.

Architecture

Three-Tier Execution

  1. Tier 1 - Interpreter (<1ms)

    • Direct interpretation for simple expressions
    • Fast startup, good for interactive exploration
  2. Tier 2 - Cached (~0ms)

    • Previously compiled functions
    • Just function call overhead
  3. Tier 3 - JIT (50-200ms first time, cached after)

    • Full compilation for complex code
    • Native performance after first run

Protocol

The REPL uses a simple request/response protocol:

  • Eval - Evaluate an expression
  • Load - Load a file
  • Reset - Clear REPL state
  • Status - Get execution statistics
  • Shutdown - Stop the server

Usage

use oxur_repl::ReplServer;

let mut server = ReplServer::new();
let response = server.handle(ReplRequest::Eval {
    source: "(+ 1 2)".to_string()
});
Commit count: 489

cargo fmt