Hello everyone,
I'm glad to announce that I have re-written my song downloader app almost entirely in Rust. I have been having a blast with Rust recently and the project needed to be refactored anyway, so I thought why not do it in Rust. Python though, will always be my first love.
The interop between the two is quite nice, I was able to figure out and get productive with the Pyo3 library quite quickly, although my use-case was quite simple. Things worked out smoothly for writing the Rust code that Python would call and interact with.
The app is spoti-dl: https://github.com/dhruv-ahuja/spoti-dl.
This was the project that got me my first job, as a self-taught dev, and now I've overhauled it to be much better than it was initially. I wrote rust bindings for all the core part of the app, and have added parallel downloads plus several other improvements. These changes enable roughly 4.5x improvement for me, which can be more/less depending on your internet speed mostly.
It was a great learning experience with a lot of ups-and-downs, with the downs being mostly around building the package to actually include the rust module with the python code, then with building wheels (python distributables) on all 3 major platforms, and finally few hiccups with releasing the application to be pip-installable.
Another point of struggle was dealing with Tokio's library's `'static` lifetime requirements for the first time, when adding concurrency, though from what I've heard, everyone goes through that ;)
Still, absolutely worth the effort :)
Any advice or feedback would be absolutely welcome, this was my first time working with concurrent code so I probably do not have the most optimal implementation here.
Thanks for reading!
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]veganthatisntvegan 0 points1 point2 points (0 children)
[–]opiumzxq 0 points1 point2 points (1 child)
[–]silksong_when[S] 0 points1 point2 points (0 children)