#tree-structure #requirements #building #dep

dep-tree

Dependency tree structure for building dependency requirements

1 unstable release

0.1.0 Nov 21, 2024

#1 in #dep

Download history 127/week @ 2024-11-18 12/week @ 2024-11-25

139 downloads per month

MIT license

8KB
178 lines

Dependency tree structure for building dependency requirements

Example:

use dep_tree::DepTreeBuilder;

fn main() {
  let deps = DepTreeBuilder::new()
    .with_dep((1, 1), vec![(1, 2), (1, 3)])
    .with_dep((1, 2), vec![])
    .with_dep((1, 3), vec![(1, 3)]) // Self-dependency
    .with_dep((2, 0), vec![(2, 1)]) 
    .with_dep((2, 1), vec![(2, 2)]) // Circular dependency
    .with_dep((2, 2), vec![(2, 1)])
    .with_dep((2, 3), vec![])
    .build();
  println!("{}", deps.unwrap_or_else(|e| panic!("{}", e.to_string())));
}

Dependencies

~260–720KB
~17K SLoC