Crates.io | simple-shell |
lib.rs | simple-shell |
version | 0.0.1 |
source | src |
created_at | 2023-07-08 11:09:02.217759 |
updated_at | 2023-07-08 11:09:02.217759 |
description | A simple no_std shell for embedded systems |
homepage | https://github.com/explodingcamera/pogos/tree/main/crates/simple-shell |
repository | https://github.com/explodingcamera/pogos.git |
max_upload_size | |
id | 911422 |
size | 9,493 |
simple-shell
A simple shell for no_std
Rust.
fn run_shell() -> ! {
let (print, read) = (|s: &str| print!(s), || None);
let mut shell = Shell::new(print, read);
commands.insert(
"help",
ShellCommand {
help: "print this help message",
func: |_, shell| {
shell.print_help_screen();
Ok(())
},
aliases: &["?", "h"],
},
);
// Also supports async
// shell.run_async().await;
shell.run()
}