Skip to content

Commit f31dc55

Browse files
committed
Docs(Preamble): more small fixes
1 parent b4a05aa commit f31dc55

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/writing-reactors/preambles.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ The important takeaway here is with the package.json file and the compiled JavaS
440440

441441
<ShowIf rs>
442442

443-
You can use the `preamble` to define macros and functions that are shared within the given reactor:
443+
For example, you can use the `preamble` to define macros and functions that are shared within the given reactor:
444444

445445
```lf-c
446446
target Rust;
@@ -472,7 +472,8 @@ add 42 example: 52
472472

473473
By having the `preamble` inside the reactor, you can define any functions or macros to be shared within the given reactor.
474474
This will allow you to reuse code across different reactions easily within the same reactor.
475-
This also can allow us to change the scope of items using the 'use' statement.
475+
This also can allow us to change the scope of items using the `use` statement.
476+
476477
For example, the follow reactor brings the constant `PI` into scope and print out the first 15 digits of pi:
477478

478479
```lf-c
@@ -529,7 +530,7 @@ This will print:
529530
Hello, world!
530531
```
531532

532-
Its important to note that besides the crates specified in the target declarations _cargo-dependencies_ and user modules in _rust-include_, all user code is added to a module called `reactors` during compilation time.
533+
It is important to note that besides Crates specified in the rust target declaration's _cargo-dependencies_ and user modules in _rust-include_, all user code is added to a module called `reactors` during compilation time.
533534
This means that crate level attributes like `#![no_std]` will not work if added to the preamble.
534535

535536
:::danger

0 commit comments

Comments
 (0)