use std::path::PathBuf; use unrar_async::Archive; #[cfg(feature = "tokio")] #[tokio::main] async fn main() { Archive::new("archive.rar".into()).unwrap().extract_to(&PathBuf::from("./archive")).await.unwrap().process().await.unwrap(); println!("Done."); } #[cfg(feature = "async-std")] #[async_std::main] async fn main() { Archive::new("archive.rar".into()).unwrap().extract_to(&PathBuf::from("./archive")).await.unwrap().process().await.unwrap(); println!("Done."); }