@@ -346,14 +346,17 @@ fn lookup<F: FnMut(FileType, PathBuf)>(dir: &Path, mut f: F) {
346346
347347fn shared_options (
348348 mobile : bool ,
349+ args : & mut Vec < String > ,
349350 features : & mut Option < Vec < String > > ,
350351 app_settings : & RustAppSettings ,
351352) {
352353 if mobile {
354+ args. push ( "--lib" . into ( ) ) ;
353355 features
354356 . get_or_insert ( Vec :: new ( ) )
355357 . push ( "tauri/rustls-tls" . into ( ) ) ;
356358 } else {
359+ args. push ( "--bins" . into ( ) ) ;
357360 let all_features = app_settings
358361 . manifest
359362 . all_enabled_features ( if let Some ( f) = features { f } else { & [ ] } ) ;
@@ -385,7 +388,7 @@ fn dev_options(
385388 }
386389 * args = dev_args;
387390
388- shared_options ( mobile, features, app_settings) ;
391+ shared_options ( mobile, args , features, app_settings) ;
389392
390393 if !args. contains ( & "--no-default-features" . into ( ) ) {
391394 let manifest_features = app_settings. manifest . features ( ) ;
@@ -410,11 +413,16 @@ fn dev_options(
410413}
411414
412415impl Rust {
413- pub fn build_options ( & self , features : & mut Option < Vec < String > > , mobile : bool ) {
416+ pub fn build_options (
417+ & self ,
418+ args : & mut Vec < String > ,
419+ features : & mut Option < Vec < String > > ,
420+ mobile : bool ,
421+ ) {
414422 features
415423 . get_or_insert ( Vec :: new ( ) )
416424 . push ( "custom-protocol" . into ( ) ) ;
417- shared_options ( mobile, features, & self . app_settings ) ;
425+ shared_options ( mobile, args , features, & self . app_settings ) ;
418426 }
419427
420428 fn run_dev < F : Fn ( ExitStatus , ExitReason ) + Send + Sync + ' static > (
0 commit comments