Crate riot_shell_commands

source
Expand description

A collection of typical RIOT shell commmands, implemented in Rust

They serve three purposes:

  1. They are examples of how to use particular functions of RIOT
  2. They are a test case for comparing string formatting overhead (both C vs. standard Rust and standard Rust vs. potentially upcoming ufmt based implementations)
  3. In Rust applications, they can be included instead of the operating system provided shell function, when 2. comes out net positive (especially if no other printfs are around and Rust’s formatting is used for other reasons anyway), possibly also with a Rust based shell prompt.

§Feature flags

  • shell (enabled by default) — Build the all function that depends on shell presence. This is default because it is the main function of the module, but can be disabled for situations when no shell is present but the shell commands (which are often generic enough to write into any writer) are used for different purposes (for example to provide a textual ps output over a network connection).

  • static (enabled by default) — Register all built commands with their default names and descriptions through XFA for any RIOT shell.

    This is enabled by default.

  • saul — Include components that depend on SAUL presence

  • ztimer — Include components that depend on ztimer presence

  • nightly_docs — Enable documentation enhancements that depend on nightly

    Currently, this just enables doc_auto_cfg.

Modules§

Functions§

  • allshell
    A command list including all the commands defined in this crate
  • An implementation of a ps command in Rust
  • saulsaul
    Expose the read side of the SAUL registry in a command that allows listing, querying and setting SAUL entries.
  • sleepztimer
    A sleep in seconds implemented on the milliseconds ztimer