Coder Social home page Coder Social logo

thriftgo's Introduction

thriftgo

Thriftgo is an implementation of thrift compiler in go language. It has a command line interface similar to the apache/thrift compiler and is enhanced with a plugin mechanism which makes it more powerful.

Installation

Note: before executing the following commands, make sure your GOPATH environment is properly set.

Using go install:

GO111MODULE=on go install github.com/cloudwego/thriftgo

Or build from source:

git clone https://github.com/cloudwego/thriftgo.git
cd thriftgo
export GO111MODULE=on
go mod tidy
go build
go install

Usage

The thriftgo command line tool accepts IDL files and compiles them to the target language. Each backend has a plentiful set of options to customize the generated code.

By the moment, thriftgo can generates golang code only. More backends will be added in the future.

To compile an thrift IDL to golang files with the default setting, you can just run:

thriftgo -g go the-idl-file.thrift

Run thriftgo -h to see all available options for each backend and their meanings.

Plugin

If the code generated by thriftgo does not satisfy your needs and the options provideds do not meet your requirements. You may also write plugins to generate code beside thriftgo while taking the advantage of thriftgo's IDL parser. Check the documentation of the plugin package for more details.

thriftgo's People

Contributors

asterdy avatar choleraehyq avatar lsjbd avatar purewhitewu avatar simon0-o 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.