-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* `#[wasm_bindgen(start)]` shouldn't require `pub` * Adjust examples and tests
- Loading branch information
Showing
24 changed files
with
40 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(start)] | ||
pub fn foo() {} | ||
fn foo() {} | ||
|
||
#[wasm_bindgen(start)] | ||
pub fn foo2(x: u32) {} | ||
fn foo2(x: u32) {} | ||
|
||
#[wasm_bindgen(start)] | ||
pub fn foo3<T>() {} | ||
fn foo3<T>() {} | ||
|
||
#[wasm_bindgen(start)] | ||
pub fn foo4() -> Result<(), JsValue> { Ok(()) } | ||
fn foo4() -> Result<(), JsValue> { Ok(()) } | ||
|
||
#[wasm_bindgen(start)] | ||
pub fn foo5() -> Result<JsValue, ()> { Err(()) } | ||
fn foo5() -> Result<JsValue, ()> { Err(()) } | ||
|
||
#[wasm_bindgen(start)] | ||
pub fn foo6() -> Result<JsValue, JsValue> { Ok(JsValue::from(1u32)) } | ||
fn foo6() -> Result<JsValue, JsValue> { Ok(JsValue::from(1u32)) } | ||
|
||
#[wasm_bindgen(start)] | ||
pub async fn foo_async1() {} | ||
async fn foo_async1() {} | ||
|
||
#[wasm_bindgen(start)] | ||
pub async fn foo_async2() -> Result<(), JsValue> { Ok(()) } | ||
async fn foo_async2() -> Result<(), JsValue> { Ok(()) } | ||
|
||
#[wasm_bindgen(start)] | ||
pub async fn foo_async3() -> Result<JsValue, ()> { Err(()) } | ||
async fn foo_async3() -> Result<JsValue, ()> { Err(()) } | ||
|
||
#[wasm_bindgen(start)] | ||
pub async fn foo_async4() -> Result<JsValue, JsValue> { Ok(JsValue::from(1u32)) } | ||
async fn foo_async4() -> Result<JsValue, JsValue> { Ok(JsValue::from(1u32)) } | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ extern "C" { | |
} | ||
|
||
#[wasm_bindgen(start)] | ||
pub fn run() { | ||
fn run() { | ||
log("Hello, World!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters