mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
split generated code so that methods are now in core
This commit is contained in:
parent
3b656b911a
commit
c333f20531
20 changed files with 1337 additions and 1206 deletions
|
|
@ -1,22 +1,24 @@
|
|||
mod codegen;
|
||||
|
||||
fn main() {
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let command = std::env::args().nth(1).unwrap_or_else(|| {
|
||||
eprintln!("No task provided");
|
||||
eprintln!("Error: No task provided");
|
||||
help();
|
||||
std::process::exit(1);
|
||||
});
|
||||
|
||||
match command.as_str() {
|
||||
"generate" | "gen" => codegen::main(),
|
||||
_ => eprintln!("Unknown command {command}."),
|
||||
_ => {
|
||||
eprintln!("Unknown command {command}.");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn help() {
|
||||
println!(
|
||||
"Available tasks:
|
||||
generate - Generate amqp method code in `amqp_transport/src/methods/generated.rs.
|
||||
Dumps code to stdout and should be redirected manually."
|
||||
generate, gen - Generate amqp method code in `amqp_transport/src/methods/generated.rs and amqp_core/src/methods/generated.rs"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue