Use rustic_core
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.
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.
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?
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.
Hey,
I've pushed changes into main which should allow building with stable rust.