-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from spielrs/development
Add build file
- Loading branch information
Showing
3 changed files
with
10 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pub fn main() { | ||
let using_web_sys = cfg!(feature = "web_sys"); | ||
let using_std_web = cfg!(feature = "std_web"); | ||
if using_web_sys && using_std_web { | ||
panic!("Yew does not allow the `web_sys` and `std_web` cargo features to be used simultaneously"); | ||
} else if !using_web_sys && !using_std_web { | ||
panic!("Yew requires selecting either the `web_sys` or `std_web` cargo feature"); | ||
} | ||
} |
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,3 +1,4 @@ | ||
#[cfg(any(feature = "std_web", feature = "web_sys"))] | ||
use yew::prelude::*; | ||
|
||
#[derive(Clone)] | ||
|
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