dominus

One damus client to rule them all
git clone git://jb55.com/dominus
Log | Files | Refs | README

lib.rs (871B)


      1 mod app;
      2 //mod camera;
      3 mod contacts;
      4 mod error;
      5 
      6 pub use app::Damus;
      7 pub use error::Error;
      8 
      9 pub type Result<T> = std::result::Result<T, error::Error>;
     10 
     11 //#[cfg(target_os = "android")]
     12 //use egui_android::run_android;
     13 
     14 #[cfg(target_os = "android")]
     15 use winit::platform::android::activity::AndroidApp;
     16 
     17 #[cfg(target_os = "android")]
     18 #[no_mangle]
     19 pub fn android_main(app: AndroidApp) {
     20     std::env::set_var("RUST_BACKTRACE", "full");
     21     android_logger::init_once(android_logger::Config::default().with_min_level(log::Level::Info));
     22 
     23     let mut options = eframe::NativeOptions::default();
     24     options.renderer = eframe::Renderer::Wgpu;
     25     options.event_loop_builder = Some(Box::new(move |builder| {
     26         builder.with_android_app(app);
     27     }));
     28 
     29     eframe::run_native(
     30         "Damus Desktop",
     31         options,
     32         Box::new(|_cc| Box::new(Damus::new())),
     33     );
     34 }