You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I plan to use conserve as library. Is there any starting point for me?
Something like trust-dns client where it explains the minimal working example and docs for using it as a library (not as CLI).
use std::path::Path;use conserve::archive::Archive;use conserve::backup::{backup,BackupOptions};use conserve::live_tree::LiveTree;fnmain(){let archive = Path::new("/home/user/playground/backup/storage/");// must be a directorylet source = "/home/user/playground/backup/source/";// create archive// Archive::create_path(archive).unwrap();// backupbackup(&Archive::open_path(&archive).unwrap(),&LiveTree::open(source).unwrap(),&BackupOptions::default(),).expect("backup");println!("Hello, world!");}
Hi @azzamsa great to hear that you're interested. For now the existing code, as you found, is the best guide, but we can certainly talk about how to make it easier to use.
What were you thinking to build on top of it?
Bear in mind the GPL v2 license imposes some requirements on programs that include Conserve.
Activity
azzamsa commentedon Sep 3, 2021
Fortunately, I am able to build the backup MWE by reading trough /bin/conserve.rs, tests/api/backup.rs, and the documentation
sourcefrog commentedon Sep 3, 2021
Hi @azzamsa great to hear that you're interested. For now the existing code, as you found, is the best guide, but we can certainly talk about how to make it easier to use.
What were you thinking to build on top of it?
Bear in mind the GPL v2 license imposes some requirements on programs that include Conserve.