Written in C++, using ImGui
Currently support only proto2
protobuf-editor.mp4
Tested on Ubuntu 18.04, 20.04, g++-9, clang
- install required packages:
sudo apt-get install g++ cmake libglfw3 libglfw3-dev
- install protoc version 24.3 from here:
search for
protoc-24.3-linux-x86_64.zip
(if you need to upgrade your protoc, see this)
-
Clone this repo.
-
Put your protobuf schema file (".proto" file) in
your_schema
dir inside repo:cp path/to/your/schema your_schema/schema.proto
-
In the
your_schema/schema.proto
:a. Change the root message to be called
MyRecord
b. Change the package to be
protobuf.editor
c. Check proto version is
proto2
for example:
syntax = "proto2"; package protobuf.editor; message OtherRecord { int32 other_id = 1; } message MyRecord { string f1 = 1; OtherRecord f2 = 2; }
-
Generate C++ code from your schema:
protoc --proto_path=your_schema/ schema.proto --cpp_out=your_schema/
-
In the root directory of the repo, do:
git submodule update --init --recursive mkdir build cd build cmake -DABSL_PROPAGATE_CXX_STD=y -Dprotobuf_BUILD_TESTS=OFF .. make -j 8
-
Run GUI:
./protobuf-editor/protobuf-editor