wokelangiser 0.1.0

Add consent patterns, inclusive errors, and accessibility to existing code via WokeLang
Documentation
// SPDX-License-Identifier: PMPL-1.0-or-later
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
//
// wokelangiser library crate — public API for consent pattern generation,
// WCAG accessibility compliance checking, and internationalisation extraction.
//
// This module re-exports the core types and functions so that other crates
// can use wokelangiser as a library (e.g. for integration into CI/CD pipelines
// or editor plugins).

pub mod abi;
pub mod codegen;
pub mod manifest;

pub use manifest::{load_manifest, validate, Manifest};

/// Run the full wokelangiser generation pipeline:
/// load a manifest, validate it, and generate all output files.
///
/// # Arguments
/// * `manifest_path` - Path to the wokelangiser.toml file
/// * `output_dir` - Directory where generated files will be written
///
/// # Errors
/// Returns an error if the manifest cannot be loaded or validated,
/// or if code generation fails.
pub fn generate(manifest_path: &str, output_dir: &str) -> anyhow::Result<()> {
    let m = load_manifest(manifest_path)?;
    validate(&m)?;
    codegen::generate_all(&m, output_dir)
}