lua-protobuf

(★ 1,909)

A Lua module to work with Google protobuf

File Explorer

  • .gitignore
  • .travis.yml
  • CMakeLists.txt
  • LICENSE
  • luaunit.lua
  • pb.c
  • pb.h
  • protoc.lua
  • README.md
  • README.zh.md
  • serpent.lua
  • test.lua

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

fmt

View Details ▼

Reformat a text file by joining its paragraphs and limiting the line width to a number of characters (75 by default).

fmt {{path/to/file}}

Reformat a file:

fmt {{[-w|--width]}} {{n}} {{path/to/file}}

Reformat a file producing output lines of (at most) `n` characters:

fmt {{[-s|--split-only]}} {{path/to/file}}

Reformat a file without joining lines shorter than the given width together:

🔍

gcc

View Details ▼

Preprocess and compile C and C++ source files, then assemble and link them together.
Part of GCC (GNU Compiler Collection).

gcc {{path/to/source1.c path/to/source2.c ...}} {{[-o|--output]}} {{path/to/output_executable}}

Compile multiple source files into an executable:

gcc {{path/to/source.c}} -Wall {{[-o|--output]}} {{output_executable}}

Activate output of all errors and warnings:

gcc {{path/to/source.c}} -Wall {{[-g|--debug]}} -Og {{[-o|--output]}} {{path/to/output_executable}}

Show common warnings, debug symbols in output, and optimize without affecting debugging:

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

protoc

View Details ▼

Parse Google Protobuf `.proto` files and generate output in the specified language.

protoc --python_out={{path/to/output_directory}} {{input_file.proto}}

Generate Python code from a `.proto` file:

protoc --java_out={{path/to/output_directory}} --proto_path={{path/to/import_search_path}} {{input_file.proto}}

Generate Java code from a `.proto` file that imports other `.proto` files:

protoc --csharp_out={{path/to/c#_output_directory}} --js_out={{path/to/js_output_directory}} {{input_file.proto}}

Generate code for multiple languages:

# Project Badges

// repository documentation