Skip to content

About

dependency-free shell for embedded devices

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

0 watching

Forks

simple-shell

crates.io docs.rs

A dependency-free no_std shell for embedded systems, with blocking and async input. It was originally developed as part of rust-os-blog.

use core::fmt::Write;
use simple_shell::{Shell, commands};

let commands = commands! {
    /// Show available commands.
    "help" | "?" => |_, shell| shell.print_help_screen(),
    /// Print the given arguments.
    "echo" => |argv, shell| writeln!(shell, "{}", argv[1..].join(" ")),
};

Shell::new(write, read).with_commands(&commands).run()?;

See the blocking and async examples for complete programs.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in simple-shell by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

dependency-free shell for embedded devices

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages