Skip to content

Commit f7fed4d

Browse files
committed
doc: develop: rust: Various cleanups to docs
Minor fixes to the documentation from review feedback. Signed-off-by: David Brown <[email protected]>
1 parent 71619de commit f7fed4d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/develop/languages/rust/bindings.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Bindings to Zephyr for Rust
44
###########################
55

6-
Zephyr is written in C, and it's primary API is also made available to C. It is written as a
6+
Zephyr is written in C, and its primary API is also made available to C. It is written as a
77
mixture of types, function prototypes, inline functions, and macros.
88

99
Although Rust interfaces fairly easily with C at an ABI level, the compiler does not have any
@@ -22,21 +22,21 @@ generate the Rust code needed to call this code.
2222

2323
Because the Zephyr headers use numerous conditional compilation macros, the bindings needed will be
2424
very specialized to a given board, and even a given configuration. To do this, the file
25-
:file:`lib/rust/zephyr-sys/build.rs`, which ``cargo`` knows to run at build time will
25+
:file:`lib/rust/zephyr-sys/build.rs`, which ``cargo`` knows to run at build time, will
2626
generate the bindings for the particular build of Zephyr being used by the current Rust application.
2727

2828
These bindings will be made available in the ``zephyr-sys`` crate, as well as under ``zephyr::raw``.
2929

3030
Using the Bindings
3131
******************
3232

33-
In general, using direct bindings to C function from Rust is a bit more difficult than calling them
33+
In general, using direct bindings to C functions from Rust is a bit more difficult than calling them
3434
from C. Although all of these calls are considered "unsafe", and must be placed in an ``unsafe``
35-
block, the rust language has stricter constraints on what is allowed, even by unsafe code. Although
36-
the intent of the Rust on Zephyr project is to allow full use of Zephyr, without needing to resort
37-
to unsafe code, it is understandable that this implementation will be incomplete, and some
38-
applications may require resorting to, what is sometimes referred to as "The Dark Arts". The
39-
`Rustinomicon`_ is a good resource for those wishing to delve into this area.
35+
block, the Rust language has stricter constraints on what is allowed, even by unsafe code. The
36+
intent of supporting the Rust Language on Zephyr project is to allow full use of Zephyr, without
37+
needing to resort to unsafe code, it is understandable that this implementation will be incomplete,
38+
and some applications may require resorting to, what is sometimes referred to as "The Dark Arts".
39+
The `Rustinomicon`_ is a good resource for those wishing to delve into this area.
4040

4141
.. _Rustinomicon: https://doc.rust-lang.org/nomicon/
4242

0 commit comments

Comments
 (0)