File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ pub struct Args {
1616}
1717
1818fn main ( ) {
19+ #[ cfg( not( target_arch = "wasm32" ) ) ]
1920 let args: Args = argh:: from_env ( ) ;
21+ #[ cfg( target_arch = "wasm32" ) ]
22+ let args: Args = Args :: from_args ( & [ ] , & [ ] ) . unwrap ( ) ;
2023
2124 let mut app = App :: new ( ) ;
2225 app. add_plugins ( ( DefaultPlugins , ) )
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ pub struct Args {
1616}
1717
1818fn main ( ) {
19+ #[ cfg( not( target_arch = "wasm32" ) ) ]
1920 let args: Args = argh:: from_env ( ) ;
21+ #[ cfg( target_arch = "wasm32" ) ]
22+ let args: Args = Args :: from_args ( & [ ] , & [ ] ) . unwrap ( ) ;
2023
2124 let mut app = App :: new ( ) ;
2225 app. add_plugins ( ( DefaultPlugins , ) )
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ pub struct Args {
1616}
1717
1818fn main ( ) {
19+ #[ cfg( not( target_arch = "wasm32" ) ) ]
1920 let args: Args = argh:: from_env ( ) ;
21+ #[ cfg( target_arch = "wasm32" ) ]
22+ let args: Args = Args :: from_args ( & [ ] , & [ ] ) . unwrap ( ) ;
2023
2124 let mut app = App :: new ( ) ;
2225 app. add_plugins ( DefaultPlugins . set ( WindowPlugin {
You can’t perform that action at this time.
0 commit comments