Skip to main content

webgraph_cli/run/
mod.rs

1/*
2 * SPDX-FileCopyrightText: 2024 Tommaso Fontana
3 * SPDX-FileCopyrightText: 2026 Sebastiano Vigna
4 *
5 * SPDX-License-Identifier: Apache-2.0 OR MIT
6 */
7
8use anyhow::Result;
9use clap::Subcommand;
10
11pub mod llp;
12pub mod llp_combine;
13pub mod pad;
14
15/// Runs algorithms on graphs.​
16#[derive(Subcommand, Debug)]
17#[command(name = "run")]
18pub enum SubCommands {
19    Llp(llp::CliArgs),
20    LlpCombine(llp_combine::CliArgs),
21    Pad(pad::CliArgs),
22}
23
24pub fn main(subcommand: SubCommands) -> Result<()> {
25    match subcommand {
26        SubCommands::Llp(args) => llp::main(args),
27        SubCommands::LlpCombine(args) => llp_combine::main(args),
28        SubCommands::Pad(args) => pad::main(args),
29    }
30}