Skip to content

Commit

Permalink
rustic_core: Prepare v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Sep 13, 2023
1 parent 97c2d52 commit 8d37670
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions crates/rustic_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustic_core"
version = "0.6.0"
version = "0.1.1"
authors = ["Alexander Weiss"]
categories = [
"Algorithms",
Expand All @@ -15,7 +15,7 @@ homepage = { workspace = true }
include = ["src/**/*", "LICENSE-*", "README.md", "examples/**/*"]
keywords = ["backup", "restic", "deduplication", "encryption", "library"]
license = { workspace = true }
publish = false # Don't publish until we fix/stabilize public api!!!
publish = true
readme = "README.md"
resolver = "2"
rust-version = "1.66.1"
Expand All @@ -35,7 +35,7 @@ edition = "2021"
default = []
cli = ["merge", "clap"]
merge = ["dep:merge"]
clap = ["dep:clap", "dep:clap_complete"]
clap = ["dep:clap"]

[dependencies]
# errors
Expand Down Expand Up @@ -100,7 +100,6 @@ dirs = { workspace = true }

# cli
clap = { workspace = true, optional = true }
clap_complete = { workspace = true, optional = true }

bytesize = { workspace = true }
directories = { workspace = true }
Expand Down
6 changes: 5 additions & 1 deletion crates/rustic_core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ backup tool that provides fast, encrypted, deduplicated backups. It reads and
writes the `restic` repository format, which is described in their design
document.

Note that rustic_core is in an early development stage and its API will most
likely change in the next releases.


## Contact

You can ask questions in the
Expand All @@ -34,7 +38,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
rustic_core = "0.6"
rustic_core = "0.1.1"
```

## Crate features
Expand Down
28 changes: 19 additions & 9 deletions crates/rustic_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@ A library for deduplicated and encrypted backups, using repositories as specifie
This section gives a brief overview of the primary types in this crate:
TODO
The main type is the [`Repository`] type which describes a way to access a repository.
It can be in different states and allows - depending on the state - various high-level
actions to be performed on the repository like listing snapshots, backing up or restoring.
Besides this, various `*Option` types exist which allow to specify options for accessing a
[`Repository`] or for the methods used within a [`Repository`]. Those types usually offer
setter methods as well as implement [`serde::Serialize`] and [`serde::Deserialize`].
Other main types are typically result types obtained by [`Repository`] methods which sometimes
are also needed as input for other [`Repository`] method, like computing a [`PrunePlan`] and
performing it.
There are also lower level data types which represent the stored repository format or
help accessing/writing it. Those are collected in the [`repofile`] module. These types typically
implement [`serde::Serialize`] and [`serde::Deserialize`].
# Example - initialize a repository, backup to it and get snapshots
Expand Down Expand Up @@ -53,23 +67,19 @@ TODO
assert_eq!(snaps[0], snap);
```
# Lower level APIs
TODO
# Crate features
This crate exposes a few features for controlling dependency usage.
* **cli** -
Enables support for CLI features by enabling `merg` and `clap` features.
Enables support for CLI features by enabling `clap` and `merge` features.
* **clap** -
Enables a dependency on the `clap` crate and enables
parsing from the commandline. This feature is disabled by default.
* **merge** -
Enables support for merging multiple values into one, which enables the `merge`
dependency. This is needed for parsing commandline arguments and merging them
into one (e.g. config). This feature is disabled by default.
* **clap** -
Enables a dependency on the `clap` and `clap_complete` crate and enables
parsing from the commandline. This feature is disabled by default.
*/

#![allow(dead_code)]
Expand Down

0 comments on commit 8d37670

Please sign in to comment.