Skip to content

Commit

Permalink
Fix missing wasm_bindgen attribute (#2773)
Browse files Browse the repository at this point in the history
  • Loading branch information
abi authored Jan 19, 2022
1 parent 3701c9d commit 3e507e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions guide/src/contributing/design/exporting-rust-struct.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub struct Foo {

#[wasm_bindgen]
impl Foo {
#[wasm_bindgen(constructor)]
pub fn new(val: i32) -> Foo {
Foo { internal: val }
}
Expand Down

0 comments on commit 3e507e6

Please sign in to comment.