File: minimal.rs

package info (click to toggle)
rust-rustyline 17.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,032 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 272 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
use rustyline::{DefaultEditor, Result};

/// Minimal REPL
fn main() -> Result<()> {
    env_logger::init();
    let mut rl = DefaultEditor::new()?;
    loop {
        let line = rl.readline("> ")?; // read
        println!("Line: {line}"); // eval / print
    } // loop
}