12
0
Fork
You've already forked rust-examples
0
Out-of-tree examples of Rust applications written on RIOT OS. While most repos of RIOT are still primarily hosted on GitHub, this has its canonical presence (including issues and PRs) on Codeberg, exploring a larger migration.
  • Rust 75.5%
  • Makefile 24.5%
chrysn ce2f0585bf
All checks were successful
ci/woodpecker/push/build Pipeline was successful
Update examples to latest ... everything
Reviewed-on: #8
Reviewed-by: Marian Buschsieweke <maribu@noreply.codeberg.org>
2026年05月14日 17:32:18 +02:00
.cargo overrides: riot-sys 0.8 prerelease is good enough 2026年05月14日 17:14:55 +02:00
.woodpecker CI: Avoid duplicate runs from PRs from origin 2026年05月14日 17:14:55 +02:00
blinq_cli Modernize blinq examples 2026年05月14日 17:14:55 +02:00
blinq_cli_interrupt Modernize blinq examples 2026年05月14日 17:14:55 +02:00
bottles cargo: Use latest location of rust-modules and other git crates 2026年05月14日 17:14:55 +02:00
coap coap: Fix actual access to resources 2026年05月14日 17:14:55 +02:00
coap_through_embeddednal Use latest -modules with coap-numbers version fix 2026年05月14日 17:14:55 +02:00
coap_through_embeddednal_async cargo: Use latest location of rust-modules and other git crates 2026年05月14日 17:14:55 +02:00
msg_tests cargo: Use latest location of rust-modules and other git crates 2026年05月14日 17:14:55 +02:00
pktdump Modernize pktdump 2026年05月14日 17:14:55 +02:00
saul_blink cargo: Use latest location of rust-modules and other git crates 2026年05月14日 17:14:55 +02:00
shell Modernize shell example 2026年05月14日 17:14:55 +02:00
shell_threads cargo: Use latest location of rust-modules and other git crates 2026年05月14日 17:14:55 +02:00
ztimer cargo: Use latest location of rust-modules and other git crates 2026年05月14日 17:14:55 +02:00
.gitattributes git: Hide Cargo.lock changes from diff and --shortstat 2026年05月14日 16:45:13 +02:00
.gitignore Drop custom tooling now that Rust support is upstream 2021年12月16日 16:34:12 +01:00
README.rst README: Update links 2026年05月13日 11:47:40 +02:00

This is a collection of example applications written in Rust that use the RIOT Operating System via the riot-wrappers crate.

For examples in the style of Rust libraries that are on their path to becoming RIOT modules, see the riot-module-examples repository.

For general getting-started instructions for using Rust on RIOT see the RIOT documentation; the OS also contains two minimal examples of its own. This repository contains advanced examples, and is used to illustrate more of the riot-wrappers abstractions.

Examples

  • bottles: A '99 bottles of beer' program that just prints the device's debug output for some time.

    This is used as a first example not because it's particularly microcontroller-ish, but because it can be run both on any board that has a debug UART and on the native board under Linux:

    $ cd bottles
    $ make BOARD=native all term
    [read the text or abort with Ctrl-C]
  • saul_blink: A program that enumerates a device's LEDs at runtime using RIOT's Sensor Actor Über Layer (SAUL), and toggles them.

    Both for demo purposes and to ensure some meaningful action even on the native board, it also registers a "software LED" that, rather than actually lighting up, reports its status changes via stdout.

  • shell_threads: A demo of the shell integration and using multiple therads. Run it with:

    $ make BOARD=stk3700 flash term

    or:

    $ make BOARD=native all term

    and enter help to list the available shell commands.

Further documentation

To retrace the examples and to write own applications, see the riot-wrappers documentation for the safe wrappers, and the riot-sys documentation for accessing arbitrary RIOT functions. (Or, almost arbitrary: as outlined in its Extension docs section, headers that are not exported yet may need to be added to its riot-headers.h file).

License

This crate is licensed under the same terms as of the LGPL 2.1, following the license terms of the RIOT Operating System.

It is maintained by Christian M. Amsüss <ca@etonomy.org> as part of the etonomy project, see <https://etonomy.org/>.