Git Product home page Git Product logo

anakin's Introduction

Anakin GoDoc Go Report Card Maintainability Build Status Android Arsenal

Codegeneration tool for isomorphic server and mobile Go apps with gRPC & Protobuf. Share code between your backend, Android & iOS app!

Description

Anakin takes care about some routine tasks and helps to create shared code between client (mobile apps) & server app written in Go and backed by gRPC & Protobuf. So, how it works?

At the first stage, it just generates from your *.proto (with defined service, RPC-calls & allowed messages) main gRPC-file *.pb.go which may be used by any Go app. It uses protoc utility.

Next Anakin parses *.proto-file to extract RPC-methods and messages, takes templates for client and server & generates similar Go code. After that it builds binaries for Android (*.aar) and iOS (*.framework) using gomobile.

Mobile binaries build stage may fail by different reasons and you may want to go back again later when environment will be ready. Also you can ignore build stage if you want to make some changes in generated code. Anyway Anakin has another anakin-build script inside for this purpose, which automatically copied for generated $YOUR_OUTPUT/client directory with other source files when you run original anakin script.

Anakin plugin stages

Required

  1. Go 1.5 and higher.

  2. Xcode Command Line Tools (Mac OS X only, will be installed if needed).

  3. Android SDK (if Android build is needed).

Usage

anakin -P myrpc.proto [-O output_dir] [-h localhost] [-p 50051] [-android] [-ios]

Flags:
-P | --proto <proto> (required) path to *.proto-file
-O | --output <output> (optional) path to output directory, default: /gen
-h | --host <host> (optional) server host, default: localhost
-p | --port <port> (optional) server port, default: 50051
-android (optional) is Android build needed, default: false
-ios (optional) is iOS build needed, default: false

anakin-build [--android 1] [--ios 1]

Flags:
--android 1 (optional) is Android build needed, default: 1 (true)
--ios 1 (optional) is iOS build needed, default: 1 (true)

Author

License

                     GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

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.