domus

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

lib.rs (883B)


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