hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Replace electron with Tauri

Open NoelJacob opened this issue 9 months ago • 3 comments

I could make a pull request, if it's ok.

NoelJacob avatar May 05 '24 14:05 NoelJacob

It's okay.

hydralauncher avatar May 05 '24 14:05 hydralauncher

Using Tauri/Rust instead of Electron, we could use libtorrent bindings for Rust and abandon the Python ones.

pedrosantayana avatar May 06 '24 00:05 pedrosantayana

Wails its a great idea as well.

IBorgesDev avatar May 06 '24 01:05 IBorgesDev

To do it the backend aka src/main will be needs to be made into Rust. Around 3K LOC. I can do it when I'm free soon.

We could do it in other ways like compiling src/main into a nodejs embedded exe and calling src/render in a webview but that would be a hassle to develop and maintain.

https://github.com/socketsupply/socket is another alternative but I haven't tried it yet.

NoelJacob avatar May 06 '24 17:05 NoelJacob

Buddy, there is absolutely no reason to migrate all this code to another stack. Electron works just fine. If you want to collaborate in other features or talk about the project, feel free to join our Discord server

zamitto avatar May 06 '24 18:05 zamitto

Buddy, there is absolutely no reason to migrate all this code to another stack. Electron works just fine. If you want to collaborate in other features or talk about the project, feel free to join our Discord server

chubby explained that the memory problem was related to the search system, sqlite limitations, i agree, changing to another stack wont fix the problem entirely.

IBorgesDev avatar May 06 '24 18:05 IBorgesDev

Electron works just fine.

Well, that's why I asked if it's ok first 🙂

NoelJacob avatar May 07 '24 08:05 NoelJacob

@NoelJacob I said that it was okay to open a pull request, and it is indeed fine. We can go through the pros and cons of the implementation, but I don't really think that it's viable to refactor the whole Hydra codebase right now, specially the scrapers. But let me know what you think.

hydralauncher avatar May 07 '24 08:05 hydralauncher

Yeah, ok, then spending time simply making a pr now would be waste since like refactoring all JS in the backend isn't doable now. Maybe I could do later. As for pros, they are mainly low download size and much of code will be in rust. Nothing more.

NoelJacob avatar May 07 '24 09:05 NoelJacob