k0pernicus / zou

A simple and fast download accelerator, written in Rust
MIT License
177 stars 13 forks source link

Library API? #5

Open alatiera opened 6 years ago

alatiera commented 6 years ago

Hey, I am developing an application and 've been looking for a downloader library. I like zou and would like to contribute and start using it as a library.

I took a look at the code and there doesn't seem to be a straight forward API yet. Instead the cli binary sort of acts as it. Would be nice to decouple it and have main.rs consume a library API instead.

Generally I am thinking about something like the following:

fn download(uri: &str(I guess), final_path: path) Result<()> { 
    Weird magic that handles everything about downloading 
}
k0pernicus commented 6 years ago

Hello @alatiera, Thank you for your proposal! It's a great idea - are you working on this? :-) Cheers!