Skip to content

Commit 21a58be

Browse files
committed
samples: rust: Add README for rust hello world
Create a Readme for this sample, explaining how to build and what it does. Signed-off-by: David Brown <[email protected]>
1 parent 42b25cc commit 21a58be

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

samples/rust/hello_rust/README.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _hello_rust_world:
2+
3+
Hello Rust World
4+
################
5+
6+
Overview
7+
********
8+
9+
A simple :ref:`Rust <language_rust>` sample that can be used with many
10+
supported boards and prints a Hello World message to the console.
11+
12+
Building and Running
13+
********************
14+
15+
Once the proper rust toolchain has been installed. This configuration
16+
can be built and executed on QEMU as follows:
17+
18+
.. zephyr-app-commands::
19+
:zephyr-app: samples/rust/hello_rust
20+
:host-os: unix
21+
:board: qemu_riscv32
22+
:goals: run
23+
:compact:
24+
25+
To build for another board, change "qemu_riscv32" above to that
26+
board's name.
27+
28+
Sample Output
29+
=============
30+
31+
.. code-block: console
32+
33+
Hello world from Rust on qemu_riscv32
34+
35+
Exit QEMU by pressing :kbd:`CTRL+C`

0 commit comments

Comments
 (0)