Codegeneration tool for isomorphic server and mobile Go apps with gRPC & Protobuf.

Overview

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 (required) path to *.proto-file
-O | --output (optional) path to output directory, default: /gen
-h | --host (optional) server host, default: localhost
-p | --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

Kirill Biakov

License

                     GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. 
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
You might also like...
A simple GCD based HTTP client and server, written in 'pure' Swift
A simple GCD based HTTP client and server, written in 'pure' Swift

SwiftyHTTP Note: I'm probably not going to update this any further - If you need a Swift networking toolset for the server side, consider: Macro.swift

WebSocket implementation for use by Client and Server

WebSocket ⚠️ This module contains no networking. To create a WebSocket Server, see WebSocketServer. To create a WebSocket Client, see WebSocketClient.

Setup your class structure in Xcode Interface Builder and save() in Parse Server.
Setup your class structure in Xcode Interface Builder and save() in Parse Server.

ISParseBind With ISParseBind you can save, update and query PFObjects using the power of Xcode Interface Builder resources. https://www.youtube.com/wa

A slim implementation of a websocket server using Swift and Vapor 4.0.

Swift Websocket Server Example using Vapor 4.0 This project includes a minimum working example for a websocket server written in Swift. To interact wi

Music Room: a mobile app that offers a new way of experiencing music
Music Room: a mobile app that offers a new way of experiencing music

🎼 Music Room - 42 School Project 🎸 🤳🏻 Music Room is a mobile app that offers

BP Passport is a mobile app to help patients with blood pressure management

BP Passport - Simple for Patients BP Passport is a native mobile application written in React Native - a JavaScript library that renders native, cross

💧 A server-side Swift web framework.
💧 A server-side Swift web framework.

Vapor is a web framework for Swift. It provides a beautifully expressive and easy to use foundation for your next website, API, or cloud project. Take

Tiny http server engine written in Swift programming language.

What is Swifter? Tiny http server engine written in Swift programming language. Branches * stable - lands on CocoaPods and others. Supports the latest

Swift Express is a simple, yet unopinionated web application server written in Swift
Swift Express is a simple, yet unopinionated web application server written in Swift

Documentation h5 align="right"a href="http://demo.swiftexpress.io/"Live 🐧 server running Demo img src="https://cdn0.iconfinder.com/data/icons/

Comments
  • A similar way

    A similar way

    As far as I can see this is similar to yours. But it does not generate the client code.

    https://github.com/kenshaw/go-jakarta/tree/master/02-gomobile-and-grpc

    I really like your approach and. Want to try to also generate jsonrpc so the web view clients can talk to the golang backend.

    opened by ghost 0
Owner
Kirill Biakov
Sr. Android developer at @tutu-ru. Passionate about mobile app architecture, Kotlin and Rx.
Kirill Biakov
Approov-service-ios-swift-grpc - Approov service layer for iOS clients using GRPC

Approov Service for GRPC A wrapper for the Approov SDK to enable easy integratio

Approov Integration Examples 0 Jan 21, 2022
Plugin and runtime library for using protobuf with Swift

Swift Protobuf Welcome to Swift Protobuf! Apple's Swift programming language is a perfect complement to Google's Protocol Buffer ("protobuf") serializ

Apple 4.1k Jan 6, 2023
Grpc example project for swift

How to gRPC on Swift Projects This file aims to guide you to gRPC implementation on your swift project. Installing the Protobuf Compiler Open Terminal

Mert Gürcan 0 Dec 8, 2021
Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)

Perfect: Server-Side Swift 简体中文 Perfect: Server-Side Swift Perfect is a complete and powerful toolbox, framework, and application server for Linux, iO

PerfectlySoft Inc. 13.9k Jan 6, 2023
A place to share code and server configurations in support of the networkQuality tool

Network Quality Server Welcome! The Network Quality Server project was created as a place to share example servers that can used by the networkQuality

null 99 Jan 3, 2023
A tool to build projects on MacOS and a remote linux server with one command

DualBuild DualBuild is a command line tool for building projects on MacOS and a remote Linux server. ##Setup Install the repository git clone https://

Operator Foundation 0 Dec 26, 2021
Mullvad VPN desktop and mobile app

Mullvad VPN desktop and mobile app Welcome to the Mullvad VPN client app. This repository contains all the source code for the desktop and mobile vers

Mullvad VPN 3k Jan 3, 2023
A Swift web framework and HTTP server.

A Swift Web Framework and HTTP Server Summary Kitura is a web framework and web server that is created for web services written in Swift. For more inf

Kitura 7.6k Jan 6, 2023
Lightweight library for web server applications in Swift on macOS and Linux powered by coroutines.

Why Zewo? • Support • Community • Contributing Zewo Zewo is a lightweight library for web applications in Swift. What sets Zewo apart? Zewo is not a w

Zewo 1.9k Dec 22, 2022
🔌 Non-blocking TCP socket layer, with event-driven server and client.

Original authors Honza Dvorsky - http://honzadvorsky.com, @czechboy0 Matthias Kreileder - @matthiaskr1 At the request of the original authors, we ask

Vapor Community 574 Dec 7, 2022