prql-compiler 0.2.2

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement.
Documentation
use std::process::exit;

#[cfg(feature = "cli")]
fn main() -> color_eyre::eyre::Result<()> {
    use clap::Parser;
    use prql_compiler::Cli;

    color_eyre::install()?;
    let mut cli = Cli::parse();

    if let Err(error) = cli.execute() {
        eprintln!("{error}");
        exit(1)
    }

    Ok(())
}

#[cfg(not(feature = "cli"))]
fn main() -> ! {
    panic!("Not used as a binary in wasm (but it seems cargo insists we have a `main` function).")
}