Requirements
Rust Version
rustic_core requires Rust 1.88.0 or newer.The minimum supported Rust version (MSRV) may increase in minor version updates. For example, rustic_core 0.10.x requires Rust 1.88.0, but rustic_core 0.11.0 may require a newer version.
Adding to Your Project
Basic Installation
Add rustic_core to yourCargo.toml:
With Specific Version
For more control over version updates:Backend Support
rustic_core requires a backend implementation for storage. Add rustic_backend as well:- Local filesystem storage
- REST servers
- Various cloud storage providers
Feature Flags
rustic_core provides optional features to reduce dependencies for your use case.Available Features
cli
cli
Enables CLI-related functionality by enabling both This enables:
merge and clap features.Use when: Building command-line applications- Command-line argument parsing with clap
- Configuration merging with conflate
merge
merge
Enables support for merging multiple configuration sources.Use when: You need to combine configuration from files, environment variables, and command-line argumentsAdds dependency:
conflate for configuration mergingclap
clap
Enables command-line argument parsing.Use when: Building CLI tools but not needing full Adds dependency:
cli featureclap with derive, env, and wrap_help featuresDefault Features
By default, no optional features are enabled. This keeps the dependency tree minimal for library use.Multiple Features
Enable multiple features as needed:Core Dependencies
When you add rustic_core, you’ll get these key dependencies:Cryptography
aes256ctr_poly1305aes- AES-256-CTR encryption with Poly1305 authenticationscrypt- Key derivation from passwordssha2- SHA-256 hashing (with assembly optimizations on supported platforms)
Serialization
serde- Serialization frameworkserde_json- JSON support for repository metadatabinrw- Binary serialization for pack files
Parallelization
rayon- Data parallelismcrossbeam-channel- Multi-producer multi-consumer channelspariter- Parallel iteration utilities
Compression & Deduplication
zstd- Zstandard compressionrustic_cdc- Content-defined chunking for deduplication
File System Operations
walkdir- Directory traversalignore- Gitignore-style pattern matchingxattr- Extended file attributes (Unix/Linux)
The full dependency list is available in the Cargo.toml on GitHub.
Platform Support
rustic_core supports:- Linux - Full support including extended attributes and ACLs
- macOS - Full support with xattr
- Windows - Full support (SHA2 assembly optimizations disabled due to upstream issues)
- OpenBSD - Supported (without xattr)
Verification
Verify your installation by building a simple example:Additional Tools
For Logging
Many examples usesimplelog for output:
For Error Handling
Consider usinganyhow for easier error handling:
Next Steps
Quick Start Guide
Learn how to initialize a repository and create your first backup