Files
MetaCrate/tools/codegen/src/main.rs
Chili Palmer 9f7a4e323f
Some checks failed
Native code generation / deterministic (macos-latest) (push) Has been cancelled
Native code generation / deterministic (ubuntu-latest) (push) Has been cancelled
Native code generation / deterministic (windows-latest) (push) Has been cancelled
Imaging and meshing gate / native (macos-latest) (push) Has been cancelled
Imaging and meshing gate / native (ubuntu-latest) (push) Has been cancelled
Imaging and meshing gate / native (windows-latest) (push) Has been cancelled
JPEG 2000 feature / linux (push) Has been cancelled
JPEG 2000 feature / macos (push) Has been cancelled
JPEG 2000 feature / windows (push) Has been cancelled
Skia feature / linux (push) Has been cancelled
Skia feature / macos (push) Has been cancelled
Skia feature / windows (push) Has been cancelled
Establish native deterministic codegen framework (#45)
2026-08-09 05:26:47 +00:00

20 lines
731 B
Rust

use libremetaverse_codegen::{regenerate, vendor_inputs, workspace_root};
use std::path::Path;
fn main() {
let arguments: Vec<String> = std::env::args().skip(1).collect();
let root = workspace_root();
let result = match arguments.as_slice() {
[command] if command == "generate" => regenerate(&root, false),
[command] if command == "check" => regenerate(&root, true),
[command, reference] if command == "vendor" => vendor_inputs(&root, Path::new(reference)),
_ => Err(
"usage: libremetaverse-codegen <generate|check|vendor REFERENCE_CHECKOUT>".to_owned(),
),
};
if let Err(error) = result {
eprintln!("{error}");
std::process::exit(2);
}
}