# Defold Proto - Profobuf Library

**URL:** <https://forum.defold.com/t/defold-proto-profobuf-library/77602>\
**Category:** The Defoldmine\
**Created:** [July 31, 2024, 8:28pm UTC](https://forum.defold.com/t/defold-proto-profobuf-library/77602 "2024-07-31T20:28:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Insality](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/insality/32/39737_2.png) [@Insality](https://forum.defold.com/u/Insality)\
**Post date:** [July 31, 2024, 8:28pm UTC](https://forum.defold.com/t/defold-proto-profobuf-library/77602/1 "2024-07-31T20:28:28Z")

</div>

[![logo](https://defold-forum-bucket.nbg1.your-objectstorage.com/original/3X/5/c/5c77b042009707a763db17c9c2bd399c8d7f3a9f.jpeg)](https://github.com/Insality/defold-proto)

# Proto

**Proto** - a [Defold](https://defold.com/) library for working with protocol buffers (_protobuf_ or _proto_). The library provides functions for encoding, decoding, and verifying protocol buffer messages. Verification is used to ensure that the lua table matches the protocol buffer definition. If the table data does not match the definition, the missing fields are set to default values, and the extra fields are removed. Verification also supports nested messages.

## Features

- **Encoding** : Encode a table with data to a binary string by proto definition.
- **Decoding** : Decode a binary string to a table with data by proto definition.
- **Verification** : Verify a table with data to match the proto definition.
- **Annotations** : Editor script to generate Lua annotations from proto files.

## Setup

See the [**Defold Proto**](https://github.com/Insality/defold-proto) repository on Github for the [Setup](https://github.com/Insality/defold-proto?tab=readme-ov-file#setup), Documentation, [API Reference](https://github.com/Insality/defold-proto/blob/main/API_REFERENCE.md) and [Use Cases](https://github.com/Insality/defold-proto/blob/main/USE_CASES.md)

## ❤ Support project ❤

Your donation helps me stay engaged in creating valuable projects for **Defold**. If you appreciate what I’m doing, please consider supporting me!

[![Github-sponsors](https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/insality) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/insality) [![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/insality)
