mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
move codegen to xtask
This commit is contained in:
parent
c5d83fe776
commit
077b6fd633
12 changed files with 1456 additions and 1727 deletions
22
xtask/src/main.rs
Normal file
22
xtask/src/main.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
mod codegen;
|
||||
|
||||
fn main() {
|
||||
let command = std::env::args().nth(1).unwrap_or_else(|| {
|
||||
eprintln!("No task provided");
|
||||
help();
|
||||
std::process::exit(1);
|
||||
});
|
||||
|
||||
match command.as_str() {
|
||||
"generate" | "gen" => codegen::main(),
|
||||
_ => eprintln!("Unknown command {command}."),
|
||||
}
|
||||
}
|
||||
|
||||
fn help() {
|
||||
println!(
|
||||
"Available tasks:
|
||||
generate - Generate amqp method code in `amqp_transport/src/classes/generated.rs.
|
||||
Dumps code to stdout and should be redirected manually."
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue