
    let out_dir = std::env::var("AMQ_PROTOCOL_CODEGEN_DIR")
        .or(std::env::var("OUT_DIR"))
        .expect("OUT_DIR is not defined");
    let out_file =
        std::env::var("AMQ_PROTOCOL_CODEGEN_FILE").unwrap_or_else(|_| "protocol".to_string());
    let template = include_str!(concat!(
        env!("CARGO_MANIFEST_DIR"),
        "/templates/protocol.rs"
    ));

    CodeGenerator::simple_codegen(&out_dir, &out_file, "protocol", template, "protocol");