-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Technically we don't need this right now, but it's good to have just in case we decide go to back to using custom sections some time in the future.
- Loading branch information
Showing
6 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ stdweb-derive = { path = "../stdweb-derive" } | |
|
||
serde = "1" | ||
serde_derive = "1" | ||
|
||
dependency = { path = "dependency" } |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "dependency" | ||
version = "0.1.0" | ||
authors = ["Jan Bujak <[email protected]>"] | ||
|
||
[dependencies] | ||
stdweb = { path = "../.." } |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#[macro_use] | ||
extern crate stdweb; | ||
|
||
pub fn call() { | ||
submodule::call(); | ||
} | ||
|
||
mod submodule { | ||
pub(crate) fn call() { | ||
js!( @(no_return) | ||
Module.test_value = 123; | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use utils::*; | ||
use dependency; | ||
|
||
pub fn run() { | ||
// See https://github.com/rust-lang/rust/issues/56639 for more details. | ||
test( "indirectly_call_js_snippet_from_a_submodule_in_another_crate", || { | ||
dependency::call(); | ||
js! { | ||
assert.strictEqual( Module.test_value, 123 ); | ||
} | ||
}); | ||
} |