|
esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
|
protogen — the self-contained build-time code generator for the ESPHome native API. More...
#include "emit.hpp"#include "lexer.hpp"#include "parser.hpp"#include <cstdio>#include <filesystem>#include <fstream>#include <sstream>#include <stdexcept>#include <string>
Functions | |
| int | main (int argc, char **argv) |
protogen — the self-contained build-time code generator for the ESPHome native API.
Parses the two vendored .proto files directly and emits lightweight message classes, enums, the id<->type registry, and message_id.hpp. The wire codec lives in committed headers (proto/wire.hpp, proto/proto_message.hpp). Output is byte-for-byte identical to the reference proto3 wire format (enforced by the golden test).
/// Usage: protogen <api.proto> <api_options.proto> <out_dir>
/// <out_dir>/include/esphome/api/proto/{api_enums.hpp, api_messages.hpp,
/// message_id.hpp, api.pb.h}
/// <out_dir>/src/{api_messages.cpp, api_registry.cpp}
/// | int main | ( | int | argc, |
| char ** | argv | ||
| ) |