Skip to content

Commit 175cfbe

Browse files
committed
docs: Document alert and log functions
1 parent c89bee9 commit 175cfbe

File tree

1 file changed

+6
-2
lines changed
  • rust+wasm/{{project-name}}-wasm/src

1 file changed

+6
-2
lines changed

rust+wasm/{{project-name}}-wasm/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ pub fn set_panic_hook() {
2929
console_error_panic_hook::set_once();
3030
}
3131

32+
/// External functions for alerting and logging to the console.
33+
///
34+
/// This block defines the interface to functions that can be called
35+
/// from the WebAssembly module for alerting and debugging purposes.
3236
#[wasm_bindgen]
3337
extern "C" {
34-
// For alerting
38+
/// For alerting
3539
pub(crate) fn alert(s: &str);
36-
// For logging in the console.
40+
/// For logging in the console.
3741
#[wasm_bindgen(js_namespace = console)]
3842
pub fn log(s: &str);
3943
}

0 commit comments

Comments
 (0)