onnx_pb.h#

Central header that takes the role of the protobuf-generated onnx_pb.h in the standard ONNX package.

Why this file exists

In the standard onnx package every message class (ModelProto, TensorProto, etc.) is auto-generated by the protoc compiler from the ONNX .proto schema files, and the generated translation unit is named onnx_pb.h. That file is the single include point relied on by almost all ONNX C++ source files to pull in the message types and the ONNX_LIGHT_NAMESPACE / ONNX_API macros.

onnx-light eliminates the protobuf dependency entirely: message classes are hand-written in onnx_light/onnx/onnx_proto/onnx.h using a set of code-generation macros (BEGIN_PROTO, FIELD, etc.) defined in stream_class.h. This file acts as the drop-in replacement for the protobuf-generated onnx_pb.h; it includes the hand-crafted message types and provides the same namespace and export macros so that the rest of the ONNX C++ sources compile unchanged.

Defines

ONNX_LIGHT_NAMESPACE

Namespace used for all onnx-light C++ symbols.

Defaults to onnx_light. Can be overridden at compile time to allow onnx-light to coexist with the standard onnx library in the same translation unit.