Skip to content

Commit bfe644f

Browse files
authored
rename main -> start on wasm-bindgen(start) example (#3648)
1 parent 4e60952 commit bfe644f

File tree

1 file changed

+4
-4
lines changed
  • guide/src/reference/attributes/on-rust-exports

1 file changed

+4
-4
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# `start`
22

3-
When attached to a `pub` function this attribute will configure the `start`
3+
When attached to a function this attribute will configure the `start`
44
section of the wasm executable to be emitted, executing the tagged function as
55
soon as the wasm module is instantiated.
66

77
```rust
88
#[wasm_bindgen(start)]
9-
fn main() {
9+
fn start() {
1010
// executed automatically ...
1111
}
1212
```
1313

1414
The `start` section of the wasm executable will be configured to execute the
15-
`main` function here as soon as it can. Note that due to various practical
15+
`start` function here as soon as it can. Note that due to various practical
1616
limitations today the start section of the executable may not literally point to
17-
`main`, but the `main` function here should be started up automatically when the
17+
`start`, but the `start` function here should be started up automatically when the
1818
wasm module is loaded.
1919

2020
There's a few caveats to be aware of when using the `start` attribute:

0 commit comments

Comments
 (0)