devset-core
The library behind devset: versioned file bundles, applied to a directory and
updated without losing local edits. The devset command line, in
bin/devset-cli, reads arguments and prints reports;
everything else is here.
The Chain
Every operation is a prefix of one chain, and only its last step writes:
| Step | Gives | What it does |
|---|---|---|
resolve |
Resolved |
reads the target's layers and composes them |
survey |
Survey |
compares every managed path with its record and disk |
plan |
Plan |
decides what happens to each path, merging edits |
commit |
the steps | writes the files, and the state last |
devset status stops after survey, and devset apply --dry-run after plan.
Use
use Source;
use ;
let mut target = open_or_new?;
target.add_layer?;
let resolved = resolve?;
let survey = survey?;
let plan = plan?;
commit?;
The crate's documentation, on docs.rs, runs this example as a test, and covers updating, conflicts and taking an update back.
Stability
devset-core is versioned with devset, and published to crates.io with every release. Its public API is part of what devset promises: a change that breaks it is a breaking change to devset.
License
MIT, as the rest of devset: see LICENSE.