Skip to content

Commit 7320618

Browse files
daxpeddaLiamolucko
andcommitted
Tweak docs
Co-Authored-By: Liam Murphy <[email protected]>
1 parent dfb396b commit 7320618

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

guide/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
- [`skip`](./reference/attributes/on-rust-exports/skip.md)
8686
- [`skip_jsdoc`](./reference/attributes/on-rust-exports/skip_jsdoc.md)
8787
- [`start`](./reference/attributes/on-rust-exports/start.md)
88+
- [`main`](./reference/attributes/on-rust-exports/main.md)
8889
- [`typescript_custom_section`](./reference/attributes/on-rust-exports/typescript_custom_section.md)
8990
- [`getter` and `setter`](./reference/attributes/on-rust-exports/getter-and-setter.md)
9091
- [`inspectable`](./reference/attributes/on-rust-exports/inspectable.md)

guide/src/reference/attributes/on-rust-exports/main.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ async fn main() {
2020
}
2121
```
2222

23-
This attribute is intended to be used on the `main` function of binaries or
24-
examples only. Unlike `#[wasm_bindgen(start)]`, it will not cause a function to
25-
be executed on start in a library.
23+
This attribute is only intended to be used on the `main` function of binaries or
24+
examples. Unlike `#[wasm_bindgen(start)]`, it will not cause an arbitrary
25+
function to be executed on start in a library.
2626

2727
The return type support is modeled after [`Termination`]. `()` and `Infallible`
2828
are supported, but [`Termination`] itself is not. In order, wasm-bindgen will
2929
first detect a `Result<(), impl Into<JsValue>>` and will throw proper
3030
`JsValue`s, `Result<(), impl Debug>` will convert an error to a string and throw
3131
that.
3232

33-
[`termination`]: https://doc.rust-lang.org/std/process/trait.Termination.html
33+
[`Termination`]: https://doc.rust-lang.org/std/process/trait.Termination.html

0 commit comments

Comments
 (0)