Giter VIP home page Giter VIP logo

proto-to-serializable-msg's Introduction

proto-to-serializable-msg

proto file compile simple message struct and MessagePack serializer

概要

protoファイルからメッセージ定義(クラス定義)とMessagePackの静的なシリアライザーを出力します。
C#とJavaScript/TypeScript(NodeJs)とgolangで利用できます。 protocを利用しないためシングルバイナリで動作します。

なにに使うの?

主にゲーム等のリアルタイム通信系でHTTPではなくUDP等を併用するケースで使用する目的で作成しました。
後、protocの吐き出す定義ファイルが少し読みにくいので、シンプルにしたかったのも目的の一つです。
(シリアライザー部分をつけたせいであんまり変わってないかも)

ProtocolBufferでよくない?

はい。ほぼ全てのケースで、そのままProtocolBufferを使う方がいいです。
protoファイルを使うのであれば、gRPCを避ける必要がない気がするのでそのまま使いましょう。

How To Use

# get
go get github.com/yazawa-ichio/proto-to-serializable-msg/cmd/proto-to-serializable-msg
# gen message
proto-to-serializable-msg -lang cs -input ./input/proto -output ./out/proto
# use Config
proto-to-serializable-msg -c ./proto-config.yml

Option

Short Long
-l -lang generate language
-i -input input dir or *.proto file
-o -output output dir
-d -dryrun output dryrun
-c -config generate use config.yml

Lang

short long
cs csharp
js javascript
ts typescript
go golang

Config

sample config

input: "../proto"
lang:
  go:
    output: "./out/go/proto"
  csharp:
    output: "./out/cs/proto"
    property: false
    serializable: true
  js:
    output: "./out/ts/proto"
    use_ts: true
    disable_package_to_dir: false

Thanks to the developers of the packages used to create this software.

proto-to-serializable-msg's People

Contributors

yazawa-ichio avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.