1use aeth_task::ready_poll::local_ready_poll;
2use aeth_task::{Handle, framework, spawn_foreground};
3
4pub type Result<T> = anyhow::Result<T>;
7
8pub fn entrypoint<F>(future: F) -> Result<()>
10where
11 F: Future<Output = Result<()>> + 'static,
12{
13 let taskfx_cfg = framework::Config::default();
14 let taskfx = framework::initialize(taskfx_cfg)?;
15
16 let (main, poll) = local_ready_poll(future);
17 spawn_foreground(main).detach();
18
19 aeth_window::subsystem::run(taskfx, poll)?;
20 Ok(())
21}
22
23pub use aeth_entry_macros::main;