esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
Functions
main.cpp File Reference

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>
Include dependency graph for main.cpp:

Functions

int main (int argc, char **argv)
 

Detailed Description

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}
/// 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)