API Reference

Embed Corral directly in your Rust applications.

use corrallib::{Workspace, SyncOptions};
use std::path::Path;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let workspace = Workspace::from_file(Path::new("Corral.toml"))?;
    
    let options = SyncOptions::builder()
        .threads(8)
        .depth(Some(1))
        .build();

    workspace.sync_all(&options).await?;
    Ok(())
}
Back to the top ↑