Skip to content

OphirCarmi/protobuf-editor

Repository files navigation

Protobuf-Editor

GUI for editing and review protocol buffers (=protobuf) packets

Written in C++, using ImGui

Currently support only proto2

protobuf-editor.mp4

Installation

Tested on Ubuntu 18.04, 20.04, g++-9, clang

  1. install required packages:
sudo apt-get install g++ cmake libglfw3 libglfw3-dev
  1. 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)

  1. Clone this repo.

  2. Put your protobuf schema file (".proto" file) in your_schema dir inside repo:

    cp path/to/your/schema your_schema/schema.proto
    
  3. 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;
    }
    
  4. Generate C++ code from your schema:

    protoc --proto_path=your_schema/ schema.proto --cpp_out=your_schema/
    
  5. 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
    
  6. Run GUI:

    ./protobuf-editor/protobuf-editor
    

About

GUI for editing protocol buffers (protobuf) packets

Resources

License

Stars

Watchers

Forks

Packages

No packages published