File tree 2 files changed +5
-4
lines changed
reference/attributes/on-rust-exports
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 85
85
- [ ` skip ` ] ( ./reference/attributes/on-rust-exports/skip.md )
86
86
- [ ` skip_jsdoc ` ] ( ./reference/attributes/on-rust-exports/skip_jsdoc.md )
87
87
- [ ` start ` ] ( ./reference/attributes/on-rust-exports/start.md )
88
+ - [ ` main ` ] ( ./reference/attributes/on-rust-exports/main.md )
88
89
- [ ` typescript_custom_section ` ] ( ./reference/attributes/on-rust-exports/typescript_custom_section.md )
89
90
- [ ` getter ` and ` setter ` ] ( ./reference/attributes/on-rust-exports/getter-and-setter.md )
90
91
- [ ` inspectable ` ] ( ./reference/attributes/on-rust-exports/inspectable.md )
Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ async fn main() {
20
20
}
21
21
```
22
22
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.
26
26
27
27
The return type support is modeled after [ ` Termination ` ] . ` () ` and ` Infallible `
28
28
are supported, but [ ` Termination ` ] itself is not. In order, wasm-bindgen will
29
29
first detect a ` Result<(), impl Into<JsValue>> ` and will throw proper
30
30
` JsValue ` s, ` Result<(), impl Debug> ` will convert an error to a string and throw
31
31
that.
32
32
33
- [ `termination ` ] : https://doc.rust-lang.org/std/process/trait.Termination.html
33
+ [ `Termination ` ] : https://doc.rust-lang.org/std/process/trait.Termination.html
You can’t perform that action at this time.
0 commit comments