vcs-jj
Automate the Jujutsu (jj) CLI from Rust through process execution. Part of
the vcs-toolkit-rs workspace.
Typed, repo-scoped, async commands over the jj binary, behind a mockable
interface. Commands run inside an OS job (via processkit) so no jj
subprocess is ever orphaned, return the structured Error, and honour an
optional timeout.
Inside an async context (every method is async):
use ;
use Path;
let jj = new;
let head = jj.current_change.await?; // Change
jj.describe.await?; // set @ description
A change workflow
use ;
use Path;
# async
Bookmarks and syncing the git remote
# use ;
# use Path;
# async
Timeouts
# use Jj;
use Duration;
let jj = new.default_timeout;
// every command now fails with `processkit::Error::Timeout` if it outruns 10s
# let _ = jj;
Consumers depend on the JjApi trait and substitute a fake in tests — enable
the mock feature for a mockall-generated MockJjApi, or inject a fake
process runner with Jj::with_runner(processkit::ScriptedRunner::new()…):
use ;
use ;
use Path;
# async
Requires the jj binary on PATH.
License
MIT