oxiforge 0.3.0

YAML-to-Rust code generator for oxivgl LVGL UIs
Documentation
// SPDX-License-Identifier: GPL-3.0-only
//! Regenerate `schemas/oxiforge.schema.json` from the model types.
//!
//! ```sh
//! cargo run --features schema --bin gen_schema --target x86_64-unknown-linux-gnu
//! ```
//!
//! The schema is derived from `oxiforge::model::UiDoc` (schemars), so it
//! covers exactly what the parser accepts — including all feature-gated
//! widgets enabled for this build. The `schema_sync` drift test fails CI when
//! the model changes without rerunning this.

use std::{env, fs, path::Path};

fn main() {
    let schema = oxiforge::model::generated_json_schema();
    let out = Path::new(env!("CARGO_MANIFEST_DIR")).join("schemas").join("oxiforge.schema.json");
    let _ = env::args; // no CLI args; path is fixed relative to the crate
    fs::write(&out, schema).expect("write schema file");
    println!("wrote {}", out.display());
}