icanwalkonwater / libaria2-rs

Rust bindings to libaria2.
Apache License 2.0
11 stars 2 forks source link

bump all deps, switch to 2021 edition #7

Closed nyurik closed 2 years ago

nyurik commented 2 years ago

Hi @icanwalkonwater , what's the state of your project? I would love to contribute a bit, hopefully making it multiplatform and easy to consume by various rust tools. Here's a very simple bump of all dependencies just to get started. Thx!

icanwalkonwater commented 2 years ago

Hi, thanks for your interest in this project !

This project is very low priority for me for a number of reasons (mainly my loss of interest and lack of time). The main problem with this project is that there is a lot of copies happening both in the sys crate and the safe wrapper, just take a look at the DownloadHandle for example. The libaria C++ API uses a lot of vectors and other templated types that makes it tricky. Maybe cxx has improved on this front while I was not looking but I'm not sure.

TL;DR: C++ bridges are hard for me, you are free to take the project in the direction that you want it to take.

PS: Just realized that it is kinda usable, forgot that I went this far.

nyurik commented 2 years ago

Thanks for the quick reply @icanwalkonwater ! TBH, I am very new to Rust, and a bit rusty in C++, but am interested in learning.

WRT copies -- i suspect this might not be that big of a deal since this is a aria2 management interface (what to download, where to save, what's the status, etc), not the actual critical path of execution. (i could be wrong). Regardless, this could be improved incrementally once the project gains traction.

Lastly, if you are not interested in maintaining it, could you add me as an admin, or transfer the ownership to me and i will add you as an admin? This way there are fewer forks, easier to promote, less confusing to everyone, plus can set up all the proper workflows and automated crates.io publishing.

Once again, thanks for getting this started so well -- it gave me a huge boost in Rust binding learning.

nyurik commented 2 years ago

P.S. I'm also experimenting with other tools like https://github.com/google/autocxx - will see if i can get it to run properly

icanwalkonwater commented 2 years ago

WRT copies -- i suspect this might not be that big of a deal since this is a aria2 management interface

You're right it proably doesn't matter that much, I just would have prefered that this crate didn't have any overhead of any sort compared to the cpp version. Maybe autocxx will help with that, but as you said, its not a priority.

Lastly, if you are not interested in maintaining it, could you add me as an admin, or transfer the ownership to me and i will add you as an admin?

Well, after thinking again about this project again and reread my code, turns out it seems to be way more complete that I remembered. Now I kinda want to take back what I said yesterday and instead write the goals that I had in mind as well as a roadmap. Also I am not willing to give up any of my project, much less to someone I know nothing about, I think its understandable. What I am willing to do is give you some write permissions to this repo, but I still insist that nothing is merged into master without a PR, I will setup a basic github actions to test the code on PR.

P.S. I'm also experimenting with other tools like https://github.com/google/autocxx - will see if i can get it to run properly

When I started this project, autocxx was at its very early stages and wasn't usable. It seems to have grown quite a lot in the past year, maybe its time to take another look at it.

nyurik commented 2 years ago

@icanwalkonwater obviously all changes should go via the PR+CI -- and i will submit a pr on CI improvemests -- I'm thinking the usual fmt+clippy+build+test pattern, plus automatic cargo publish on version tag.

I would be much happier if you lead this project as you clearly have far more knowledge about the interop and did all this great work.

I'm doing all my work on Linux, but i could try to reboot into Windows and see if I can get it to run there, but milage may vary - I haven't done Win dev in ages. I may also look closer into the libaria2 API - maybe add a few higher-level abstractions if they would make sense.

Lastly, I am not too sure if the lack of multi-platform support should be a blocker to releasing on crates.io -- I think if the lib is useful for Linux only, it already has great value for anyone developing on Linux. Currently there are some name squatters on crates.io for aria2 lib, but no actual lib code. I found your repo by sheer accident searching github after repeated searches, so others might not find it. If Linux version is published, those on other platforms might get interested enough to add support for other platforms as well.

icanwalkonwater commented 2 years ago

The windows thing blocking release is mainly because is seems silly to add you as a contributor when you literally just bumped some versions.

By supporting windows I just mean using something else than pkg-config on windows because it doesn't exist, it's only there to check if the lib is installed anyway.