simple-shell 0.0.1

A simple no_std shell for embedded systems
Documentation
  • Coverage
  • 0%
    0 out of 17 items documented0 out of 9 items with examples
  • Size
  • Source code size: 9.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.18 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • explodingcamera/rust-os-blog
    12 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • explodingcamera

simple-shell

A simple shell for no_std Rust.

Usage

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()
}