redu icon indicating copy to clipboard operation
redu copied to clipboard

Use rustic_core

Open aawsome opened this issue 9 months ago • 4 comments

Hi,

just wanted to suggest you use https://github.com/rustic-rs/rustic_core instead of calling the restic binary. This would give you the following benefits:

  • only compile dependency, no dependency on existing binary
  • decreased overhead (cpu/memory)
  • no more lock hassle (as rustic runs lock-free)
  • also support for rustic repositories features (e.g. hot/cold repos)

Note: As redu only needs read-only access to repositories (if I saw it correctly, only restic ls and restic snapshots), using rustic_core will also not touch the repository, but just applies read-only access..

Could be of course also used as optins, e.g. add a --rustic option which uses compiled-in rustic support instead of calling the restic binary.

aawsome avatar Apr 13 '25 09:04 aawsome

Hello,

Would you be willing to work on it?

It should require almost zero knowledge of redu, that part is entirely self-contained in the module at src/restic.rs and has a very simple and small public interface.

drdo avatar Apr 14 '25 18:04 drdo

Hi @drdo I actually wanted to spend an hour or so to do a POC implementation in order to show how (easy) it can be done... then I stumbled over the fact that you are using unstable Rust, and I must say sorry, it is too much overhead for me to add unstable Rust just for that task.. Can you please switch to stable Rust?

aawsome avatar Apr 15 '25 13:04 aawsome

I've been meaning to take a look at moving to stable, there's a few things we currently depend on but I think they should be solvable without too much trouble. I'll likely take a look at it in the next couple days.

drdo avatar Apr 15 '25 21:04 drdo

Hey,

I've pushed changes into main which should allow building with stable rust.

drdo avatar Apr 16 '25 23:04 drdo