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

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

Kirill Biakov

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.
Owner
Kirill Biakov
Sr. Android developer at @tutu-ru. Passionate about mobile app architecture, Kotlin and Rx.
Kirill Biakov
Similar Resources

GRPC - A client-server mockup, using gRPC to expose functionality.

gRPC This is a mockup application that I built to help me visualise and understand the basic concepts of gRPC. In this exchange, the client can use a

Jan 4, 2022

Go-grpc-tutorial - Simple gRPC server/client using go

Simple gRPC server/client using go Run server go run usermgmt_server/usermgmt_

Feb 14, 2022

A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2

vtprotobuf, the Vitess Protocol Buffers compiler This repository provides the protoc-gen-go-vtproto plug-in for protoc, which is used by Vitess to gen

Jan 1, 2023

webrpc is a schema-driven approach to writing backend services for modern Web apps and networks

webrpc is a schema-driven approach to writing backend services for modern Web apps and networks

webrpc is a schema-driven approach to writing backend servers for the Web. Write your server's api interface in a schema format of RIDL or JSON, and t

Jan 7, 2023

Control your Flipper Zero over Protobuf RPC protocol.

go-flipper Control your Flipper Zero over Protobuf RPC protocol. This library is designed to be transport agnostic, though I've tested it with RPC ove

Dec 17, 2022

communicate with iOS devices implemented with Golang

Golang-iDevice much more easy to use 👉 electricbubble/gidevice-cli Installation go get github.com/electricbubble/gidevice Devices package main impor

Dec 18, 2022

Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Connecting the Next Billion People Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core

Dec 31, 2022

JPRQ Customizer is a customizer that helps to use the JPRQ server code and make it compatible with your own server with custom subdomain and domain

JPRQ Customizer is a customizer that helps to use the JPRQ server code and make it compatible with your own server with custom subdomain and domain

JPRQ Customizer is a customizer that helps to use the JPRQ server code and make it compatible with your own server with custom subdomain and domain.You can upload the generated directory to your web server and expose user localhost to public internet. You can use this to make your local machine a command center for your ethical hacking purpose ;)

Jan 19, 2022

A simple way to share files and clipboard within a local network.

Shortcut Simple way to share files and clipboard with devices within a local network. Usage Run the ./shortcut executable. A browser window will be op

Mar 13, 2022
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.

Send email and SMS broadcasts to your contacts. SMS are sent via your Android phone connected to your PC.

Polysender Send email and SMS broadcasts to your contacts. Polysender is a desktop application, so it does not require a complicated server setup. Ema

Aug 11, 2022
Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages
Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages

Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages Sample client server in golang that demonstrates how to decode protobuf messages f

Sep 8, 2022
Server and client implementation of the grpc go libraries to perform unary, client streaming, server streaming and full duplex RPCs from gRPC go introduction

Description This is an implementation of a gRPC client and server that provides route guidance from gRPC Basics: Go tutorial. It demonstrates how to u

Nov 24, 2021
Go application of a gRPC client and server, built for Azure Container Apps

gRPC Sample : Go View this sample in other languages C# Go Java JavaScript Python The following is a sample of a gRPC client calling another container

Nov 29, 2021
Todo-app-grpc - Go/GRPC codebase containing RealWorld examples (CRUD, auth, advanced patterns, etc)

Go/GRPC codebase containing RealWorld examples (CRUD, auth, advanced patterns, e

Oct 12, 2022
This repo contains a sample app exposing a gRPC health endpoint to demo Kubernetes gRPC probes.

This repo contains a sample app exposing a health endpoint by implementing grpc_health_v1. Usecase is to demo the gRPC readiness and liveness probes introduced in Kubernetes 1.23.

Feb 9, 2022
Orion - a small lightweight framework written around grpc/protobuf with the aim to shorten time to build microservices at Carousell.

Orion Orion is a small lightweight framework written around grpc/protobuf with the aim to shorten time to build microservices at Carousell. It is deri

Nov 16, 2022
Raft-grpc-demo - Some example code for how to use Hashicorp's Raft implementation with gRPC

raft-grpc-example This is some example code for how to use Hashicorp's Raft impl

Jan 4, 2022
Turning a folder into a gallery website to share your videos, songs and images in the local netwrok.

What Carp Web Gallery Turning a folder into a gallery website to share your videos, songs and images in the local netwrok. Browser videos and audios i

Mar 14, 2022
Go-grpc - This is grpc server for golang.

go-grpc This is grpc server for golang. protocのインストール brew install protoc Golang用のプラグインのインストール go install google.golang.org/protobuf/cmd/protoc-gen-go

Jan 2, 2022