Skip to content

Python's cmd module implemented in Rust via proc macros.

Notifications You must be signed in to change notification settings

frectonz/cmd-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmd-rs

Python's cmd module implemented in Rust via proc macros.

/// A repl that just echos
#[derive(Cmd)]
struct Echoer;

#[cmd_handler]
impl Echoer {
    /// echo message back
    fn do_echo(&mut self, arg: &str) {
        println!("Echo: {}", arg);
    }

    fn postcmd(&self) {
        println!("post command");
    }
}

About

Python's cmd module implemented in Rust via proc macros.

Resources

Stars

Watchers

Forks