mod artifacts;
mod compiler;
mod emit;
mod error;
mod evolution;
mod model;
mod names;
use std::path::PathBuf;
pub use error::GenerateError;
#[derive(Clone, Debug)]
pub struct GenerateConfig {
pub roots: Vec<PathBuf>,
pub includes: Vec<PathBuf>,
pub rust_out: PathBuf,
pub ts_out: PathBuf,
pub lock_file: PathBuf,
pub check: bool,
pub protoc: Option<PathBuf>,
}
#[derive(Clone, Debug)]
pub struct GeneratedFiles {
pub rust: Vec<PathBuf>,
pub typescript: Vec<PathBuf>,
pub manifest: PathBuf,
pub inventory: PathBuf,
pub lock_file: PathBuf,
pub schema_hash: String,
}
pub fn generate(config: &GenerateConfig) -> Result<GeneratedFiles, GenerateError> {
compiler::generate(config)
}