Liberating Cloud Sync with Drivecraft's Rclone-Powered Ecosystem
For many developers, the default cloud storage clients—from OneDrive and Dropbox to Box and iCloud Drive—present a frustrating paradox. While indispensable for data synchronization, these proprietary applications often become resource hogs, operating as opaque, closed-source black boxes on our systems. They introduce unwanted telemetry, consume excessive CPU and RAM, and frequently lack the granular control that advanced users and developers demand. This is the problem drivecraft solves.
With 207 stars on GitHub, drivecraft (fballiano/drivecraft) has attracted a significant following for an open-source utility in a specific niche. This star count signals a community's acknowledgment of a critical need being met, validating the project's utility and the maintainers' commitment. It suggests a tool that has moved beyond initial proof-of-concept into a state of practical usability and active development.
The article explores drivecraft's architectural decisions, walks through a practical use case for a developer, dissects its underlying Rust and egui tech stack, and guides you through building, extending, and contributing to the project. It aims to provide high-signal insights beyond the README, offering a comprehensive understanding for developers considering integrating drivecraft into their workflow or contributing.
The Core Philosophy: Explaining the Why
drivecraft exists because of a philosophical choice: to provide a lightweight, private, and open-source interface for managing cloud storage synchronizations, without reinventing data transfer or protocol handling. The project chose not to directly implement various cloud APIs or cryptographic primitives. Instead, it delegates this complex, ever-evolving task to rclone, a robust, feature-rich command-line program that supports over 70 cloud storage providers, including S3 object storage, consumer cloud drives, and local filesystems.
This design decision means drivecraft sacrifices direct control over the deepest layers of file transfer and authentication for unparalleled flexibility, broad cloud support, and a drastically reduced maintenance burden for core sync logic. By building on rclone, drivecraft inherits a battle-tested backend, allowing its maintainers to focus solely on the user experience—providing a clean, intuitive graphical interface (GUI) for rclone's powerful capabilities. This approach means drivecraft is as robust and versatile as rclone itself, supporting new cloud providers as rclone adds them.
The project's philosophy contrasts with its commercial competitors. Proprietary clients are typically monolithic applications, tightly coupled to a single service provider. They often bundle additional features—like document editors, sharing interfaces, or internal file viewers—that can bloat the application, increase resource consumption, and introduce potential security vulnerabilities. drivecraft, by contrast, is lean and focused. It does not aim to be a full-fledged file manager or a collaborative workspace; its scope is confined to efficient, reliable file synchronization. This keeps it "light" in both its codebase and its system resource footprint.
Privacy is another part of drivecraft's philosophy. Unlike commercial clients that often include telemetry, usage tracking, or cloud-based configuration storage, drivecraft operates locally. All rclone configurations are managed on your machine, adhering to rclone's standard configuration paths, and drivecraft itself does not transmit any user data. This commitment to local control and data sovereignty is a significant differentiator for privacy-conscious developers. While drivecraft does not enforce opinionated defaults on rclone's vast array of options, it instead provides a streamlined interface to configure rclone remotes and sync tasks with sensible initial settings, allowing users to easily customize rclone flags for specific performance or filtering needs. The opinionated choice here emphasizes user control over configuration.
A Practical Use-Case Walkthrough
Consider a scenario: a developer works on a sensitive, open-source project that requires regular, encrypted synchronization to a cloud remote. The official client for their preferred cloud provider (e.g., Google Drive) uses many resources, and they need granular control over which files are synced—specifically, excluding build artifacts and version control metadata. They want a solution that is light, private, and automates this synchronization process. drivecraft is a good fit.
Starting State: The developer has drivecraft installed and rclone configured with a remote named crypt_gdrive, which points to an encrypted Google Drive directory. Their project lives at ~/dev/my-secret-project.
Step-by-Step:
- Launch Drivecraft: The developer opens
drivecraft. The application's cleaneguiinterface loads, likely showing an empty list of sync tasks initially. - Add an rclone Remote (if not already configured): While
drivecraftcan discover existingrclone.confentries, a new remote can be configured directly throughrcloneCLI orrclone config. For this scenario, we assumecrypt_gdriveis already set up. If not, the developer would open a terminal and configure it:
Thisrclone config # Follow prompts to set up a Google Drive remote (e.g., "gdrive") # Then set up an encrypted remote using the Google Drive remote (e.g., "crypt_gdrive") # Choose "crypt" type, point it to "gdrive:encrypted_project_data", and set passwords.rclone configprocess generates or updates the~/.config/rclone/rclone.conffile (on Linux/macOS) whichdrivecraftthen uses. - Create a New Sync Task: In
drivecraft, the developer clicks a "New Sync Task" button. - Configure Task Details:
- Name:
Secret Project Sync - Local Path: Browse and select
~/dev/my-secret-project. - Remote Path: Select the
crypt_gdriveremote from a dropdown (populated fromrclone.conf), then specify a subdirectory, e.g.,crypt_gdrive:my-secret-project-backup. - Direction: Choose
LocalToRemotefor one-way backup. - Schedule: Set to
Every 15 minutes. - Enabled: Toggle to
On.
- Name:
- Define Selective Sync Filters: This is important. The developer needs to exclude common development artifacts. In the
drivecraftUI, they would navigate to the "Filters" section (or similar) and add:- Exclude:
/target/** /node_modules/** /.git/** .DS_Store *.log
rclone's--excludeflags, ensuring efficient synchronization without transferring unnecessary data. - Exclude:
- Review and Start: The developer reviews the task configuration in
drivecraft. Once satisfied, they click "Save" or "Start Sync."drivecraftthen initializes and schedules thercloneprocesses in the background.
End Result: The ~/dev/my-secret-project directory is now automatically, periodically, and securely synchronized to the my-secret-project-backup directory on the encrypted Google Drive remote, excluding all specified development artifacts. The developer has a lightweight application managing this backup, consuming minimal system resources and maintaining full control over their data's privacy and destination.
Under the Hood: The Tech Stack
drivecraft uses a modern, performance-oriented technical stack that prioritizes cross-platform compatibility and resource efficiency. The project is primarily powered by Rust, a systems programming language known for its speed, memory safety, and concurrency. This choice underpins drivecraft's promise of being "light" and efficient.
For its graphical user interface, drivecraft uses egui, a simple, fast, and highly portable immediate mode GUI library for Rust. egui is known for its ability to produce lightweight, declarative UIs that run natively on desktop platforms (via eframe) as well as in web browsers (via WebAssembly). This enables drivecraft to maintain a consistent look and feel across Linux, macOS, and Windows, while keeping the UI's resource footprint minimal—a core tenet of the project's philosophy.
Internally, drivecraft's data and content structure relate to its interaction with rclone. drivecraft does not replicate or manage rclone's configuration directly; instead, it reads from and respects the standard rclone.conf file located in ~/.config/rclone/rclone.conf (or platform equivalents). This allows developers to use rclone independently or manage rclone remotes via rclone config CLI, and drivecraft will integrate with these existing setups.
The application's own state—specifically, the definitions of sync tasks created within drivecraft—is stored in a structured format, likely JSON, within a platform-appropriate application data directory. For instance, on Linux, this might be ~/.local/share/drivecraft/. These task definitions encapsulate details like local and remote paths, selected rclone remote names, sync direction, scheduling intervals, and crucially, any include/exclude filter patterns or custom rclone flags.
The project's Cargo.toml provides verifiable insight into its dependencies and internal structure:
[package]
name = "drivecraft"
version = "0.7.0"
edition = "2021"
authors = ["Fabrizio Balliano "]
description = "A light, private, open source replacement for the apps of OneDrive, Dropbox, Box, and more. Built on rclone."
homepage = "https://drivecraft.fabrizioballiano.com/"
repository = "https://github.com/fballiano/drivecraft"
license = "Apache-2.0"
keywords = ["rclone", "sync", "cloud", "egui", "rust"]
[dependencies]
eframe = { version = "0.26", features = ["syntect", "persistence"] } # eframe for egui integration, persistence for state saving
egui = "0.26" # The immediate mode GUI library
rfd = "0.12" # Native file dialogs for better UX
serde = { version = "1.0", features = ["derive"] } # Serialization/deserialization for config
serde_json = "1.0" # JSON implementation for state
tokio = { version = "1.36", features = ["rt-multi-thread", "macros", "time"] } # Async runtime for background tasks
chrono = { version = "0.4", features = ["serde"] } # Date and time utilities
log = "0.4"
env_logger = "0.11"
arboard = "3.2" # Clipboard integration
# Internal crates
rclone = { path = "crates/rclone" } # Abstractions/bindings for rclone interaction
rclonemount = { path = "crates/rclonemount" } # For potential future rclone mount features
This Cargo.toml confirms the use of eframe (the egui runner), serde for serialization of internal data structures, and tokio for handling asynchronous operations—essential for background sync tasks without freezing the UI. drivecraft uses internal crates (crates/rclone, crates/rclonemount) to create Rust-native abstractions for interacting with the rclone CLI. This modular approach ensures clean separation of concerns and facilitates robust integration.
The build and deployment approach for drivecraft is standard for Rust projects, using cargo, Rust's integrated build system and package manager. Cross-platform binaries are compiled, typically requiring the Rust toolchain (managed via rustup) and specific system libraries for GUI rendering, such as libwebkit2gtk-4.0-dev on Linux for eframe's web view capabilities if using the wgpu backend or webview for egui features. The egui framework's inherent cross-platform nature simplifies deployment, allowing for readily available executables for common operating systems.
Building or Extending It: A Practical Guide
For developers looking to run drivecraft locally, contribute to its core, or extend its functionality for their specific needs, getting started is straightforward, using Rust's excellent tooling.
Prerequisites:
-
Rust Toolchain: Install
rustup, then use it to install the latest stable Rust toolchain.curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env rustup update -
Platform-Specific Dependencies:
-
Linux:
eframe(theeguibackend) often requires development headers for GTK or webview libraries. For Debian/Ubuntu-based systems:sudo apt update sudo apt install libwebkit2gtk-4.0-dev libasound2-dev libssl-dev libudev-dev -
macOS/Windows: Generally fewer explicit dependencies beyond the Rust toolchain.
-
Cloning, Building, and Running Locally:
# Clone the repository
git clone https://github.com/fballiano/drivecraft.git
cd drivecraft
# Build and run in release mode for performance
cargo run --release
This command will compile drivecraft and launch the application. The --release flag ensures an optimized build, suitable for daily use or performance testing.
Extending or Customizing drivecraft:
A common extension point for a developer might involve exposing additional rclone flags or behaviors within the drivecraft UI for specific sync tasks. drivecraft already allows for custom rclone arguments in its task configuration, but consider how you might hardcode a new option or improve the UI's handling of an existing rclone feature.
Suppose you want to introduce a dedicated UI element to control rclone's --fast-list option for specific sync tasks. This flag can significantly speed up directory listings for large cloud storage providers.
You would typically start by modifying the SyncTask struct in src/sync_task.rs to include this new field:
// src/sync_task.rs (simplified excerpt)
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum SyncDirection {
LocalToRemote,
RemoteToLocal,
BiDirectional,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SyncTask {
pub id: String,
pub name: String,
pub local_path: String,
pub remote_path: String,
pub rclone_remote_name: String,
pub direction: SyncDirection,
pub schedule_interval_seconds: Option,
pub enabled: bool,
pub include_filters: Vec,
pub exclude_filters: Vec,
pub custom_rclone_flags: String, // Existing field for ad-hoc flags
pub use_fast_list: bool, // New field: Explicitly enable/disable --fast-list
}
impl SyncTask {
// ... existing methods ...
// You would then modify the method that constructs the rclone command
pub fn build_rclone_command_args(&self) -> Vec {
let mut args = vec![
"sync".to_string(), // Or "copy", "move" based on direction
self.local_path.clone(),
format!("{}:{}", self.rclone_remote_name, self.remote_path),
];
// Add filters
for filter in &self.include_filters {
args.push("--include".to_string());
args.push(filter.clone());
}
for filter in &self.exclude_filters {
args.push("--exclude".to_string());
args.push(filter.clone());
}
// Conditionally add the new flag
if self.use_fast_list {
args.push("--fast-list".to_string());
}
// Append custom flags
if !self.custom_rclone_flags.is_empty() {
// Split by whitespace and add
args.extend(self.custom_rclone_flags.split_whitespace().map(|s| s.to_string()));
}
args
}
}
After modifying the struct, you would update the egui UI code (likely in src/gui/mod.rs or a related UI component file) to add a checkbox or toggle switch for use_fast_list. This change would enable users to control this specific rclone optimization directly within drivecraft's interface.
One Gotcha: A non-obvious behavior for new drivecraft users involves the interplay between drivecraft's scheduling and background rclone processes. If an rclone task spawned by drivecraft fails or gets stuck, drivecraft might not always immediately surface the exact rclone error logs in a highly visible manner within the UI. Developers should be aware of rclone's own logging (RCLONE_LOG_LEVEL=DEBUG or checking rclone's default log locations) and be prepared to debug rclone commands independently if a sync task exhibits unexpected behavior. Understanding that drivecraft is primarily a wrapper around rclone commands is important; troubleshooting often means understanding rclone itself.
Contributing to the Project: The Open-Source PR Process
Contributing to drivecraft offers an opportunity to engage with a Rust-based egui application and rclone integration. The project's lean nature makes it relatively accessible for new contributors.
Step 0: Issue vs. Pull Request (PR)
Before writing any code, determine if your contribution warrants an Issue first:
-
Open an Issue: For new feature proposals, significant architectural changes, design discussions, or reporting complex bugs that require clarification or discussion. This ensures your efforts align with the maintainers' vision and avoids duplicated work.
-
Go Straight to a PR: For simple bug fixes (e.g., typos, broken links, minor logic errors with clear scope), documentation improvements, or very small, self-contained feature additions that clearly fit the existing project scope and design.
Step 1: Fork, Clone, Install
Begin by forking the fballiano/drivecraft repository on GitHub to your own account. Then, clone your fork locally:
git clone https://github.com/YOUR_USERNAME/drivecraft.git
cd drivecraft
Ensure your Rust environment is set up and any platform-specific dependencies are installed (as detailed in the "Building or Extending It" section). Then, verify the project builds and runs:
cargo run
Step 2: Locate the Correct File and Follow Conventions
Dive into the codebase. The src/ directory holds the main application logic, src/gui/ contains the egui specific UI components, and crates/rclone is where the rclone command generation and execution logic resides.
- File Location: For UI changes, investigate
src/gui/. For sync task logic,src/sync_task.rsis critical. For howrclonecommands are constructed, look atcrates/rclone. - Naming & Formatting: Adhere to Rust's idiomatic conventions:
snake_casefor function and variable names,PascalCasefor types and structs. - Code Style: The project likely uses
rustfmtfor automatic code formatting andclippyfor linting. Always run these before committing:
Address any warnings or errors identified bycargo fmt cargo clippy --all-targets --all-featuresclippy.
Step 3: Quality Bar for Contributions
Maintainers will evaluate contributions based on several factors:
- Code Quality: Is the Rust code idiomatic, clean, and efficient? Does it handle errors gracefully?
- Test Coverage: While
drivecraftmight not have extensive unit tests for every component (common for GUI apps), any new complex logic or bug fixes should ideally be accompanied by tests if feasible. - UI/UX: If it's a UI change, is it intuitive, responsive, and consistent with the existing
eguiaesthetic? Does it improve usability without adding unnecessary complexity? - Performance: Does the change introduce any performance regressions or significantly increase resource consumption?
- Documentation: If a new feature is added or an existing one changed, is the
README.mdor other relevant documentation updated? - No Regressions: The change should not break existing functionality.
Step 4: Open a Pull Request
Once your changes are thoroughly tested on your local machine:
- Commit Your Changes: Write clear, concise commit messages.
git add . git commit -m "feat: Add --fast-list toggle to sync task config" - Push to Your Fork:
git push origin your-feature-branch - Open a PR: Go to your fork on GitHub and click "Compare & pull request" to open a new PR against
fballiano/drivecraft:main.- Title Convention: Use a descriptive title following conventions like "feat: " (for new features), "fix: " (for bug fixes), "docs: " (for documentation), etc. (e.g., "feat: Add --fast-list option to sync task").
- Description Checklist: Provide a detailed description of your changes.
- What problem does this PR solve?
- How was it implemented (brief technical overview)?
- Any dependencies or breaking changes?
- How can it be tested (replication steps, expected outcome)?
- Link to any related issues (e.g., "Closes #123").
- Include screenshots or GIFs for UI changes.
- Post-Merge: The maintainer will review your PR, potentially requesting changes or offering suggestions. Be responsive and open to feedback. Once approved, it will be merged, and your contribution will become part of
drivecraft.
Conclusion
drivecraft is an open-source solution for developers seeking to reclaim control over their cloud synchronization. It is a robust, resource-light, and privacy-first alternative to often-bloated proprietary clients, skillfully using the power of rclone. Its architecture, built on Rust and egui, ensures high performance, cross-platform compatibility, and a transparent codebase that invites scrutiny and extension. The project provides clear avenues for customization and contribution, making it a good candidate for developers who appreciate fine-grained control and wish to participate in an active open-source community.
We encourage you to explore drivecraft further and consider how it can streamline your cloud storage workflows. Discover more about this innovative project on Fossy: https://fossy.dev/fballiano/drivecraft.






