r4bbit 94f14ae305 ci: add IDL freshness check and consolidate artifacts
Move IDL files to artifacts/ and add a convention-based CI check that
discovers all programs via */methods/guest/src/bin/*.rs and fails if
any program is missing its IDL or has one that is out of date.
2026-04-14 11:22:24 +02:00

20 lines
519 B
Rust

use std::{path::PathBuf, process};
fn main() {
let path: PathBuf = match std::env::args().nth(1) {
Some(p) => PathBuf::from(p),
None => {
eprintln!("Usage: idl-gen <source-file>");
process::exit(1);
}
};
match spel_framework_core::idl_gen::generate_idl_from_file(&path) {
Ok(idl) => println!("{}", serde_json::to_string_pretty(&idl).unwrap()),
Err(e) => {
eprintln!("Error: {e}");
process::exit(1);
}
}
}