10 releases
| new 0.1.1 | Mar 13, 2026 |
|---|---|
| 0.1.0 | Mar 13, 2026 |
| 0.0.8 | Sep 26, 2024 |
| 0.0.4 | Apr 7, 2024 |
| 0.0.2 | Oct 31, 2023 |
#79 in Text editors
2MB
45K
SLoC
Subversion bindings for Rust
This rust crate provides idiomatic bindings for the Subversion C libraries.
At the moment, it only covers the "client" library but the aim is to support all of the public C API.
Example:
use subversion::client::CheckoutOptions;
let mut ctx = subversion::client::Context::new().unwrap();
ctx.checkout(
"http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_client",
std::path::Path::new("libsvn_client"),
CheckoutOptions {
peg_revision: Revision::Head,
revision: Revision::Head,
depth: Depth::Infinity,
..default::Default()
}
)
.unwrap();
lib.rs:
Rust bindings for the Subversion version control system.
This crate provides idiomatic Rust bindings for the Subversion C libraries, enabling Rust applications to interact with Subversion repositories and working copies.
Overview
The subversion crate provides bindings to Subversion's functionality through
several modules, each corresponding to a major component of the Subversion API:
client- High-level client operations (checkout, commit, update, diff, merge, etc.)wc- Working copy management and status operationsra- Repository access layer for network operationsrepos- Repository administration (create, load, dump, verify)fs- Filesystem layer for direct repository accessdelta- Editor interface for efficient tree transformations
Features
Enable specific functionality via Cargo features:
client- Client operationswc- Working copy managementra- Repository access layerdelta- Delta/editor operationsrepos- Repository administrationurl- URL parsing utilities
Default features: ["ra", "wc", "client", "delta", "repos"]
Error Handling
All operations return a Result<T, Error<'static>> where Error wraps Subversion's
error chain. Errors can be inspected for detailed information:
use subversion::client::Context;
let mut ctx = Context::new().unwrap();
match ctx.checkout("https://svn.example.com/repo", "/tmp/wc", None, true) {
Ok(_) => println!("Checkout succeeded"),
Err(e) => {
eprintln!("Error: {}", e.full_message());
eprintln!("At: {:?}", e.location());
}
}
Thread Safety
The Subversion libraries are not thread-safe. Each thread should have its own
client::Context or other Subversion objects.
Dependencies
~1.3–6.5MB
~122K SLoC