An open API service indexing awesome lists of open source software.

https://github.com/trento-project/contracts

Trento contracts for message exchange
https://github.com/trento-project/contracts

elixir go hacktoberfest protobuf

Last synced: 4 months ago
JSON representation

Trento contracts for message exchange

Awesome Lists containing this project

README

          

= Trento Contracts

== How to generate the interfaces

Follow the next steps in order to generate the final code interfaces
from the link:https://github.com/trento-project/contracts/tree/main/protobuf[protobuf definitions].

== Pre-requirements

* Install link:https://asdf-vm.com/guide/getting-started.html[asdf] and add
all the needed plugins:

[source,bash]
....
asdf plugin add elixir
asdf plugin add erlang
asdf plugin add golang
asdf plugin add protoc
asdf plugin add protoc-gen-go
....

* Define `+golang+` version to `+asdf+` to enable `+protoc-gen-go+`
usage. For that, edit `+$HOME/.asdf/.tool-versions+` and append the next
line:

[source,bash]
....
golang 1.18.1
....

* Install the required tool versions running:

[source,bash]
....
asdf install
....

* Install and configure `+protoc-gen-elixir+` running:

[source,bash]
....
mix escript.install hex protobuf
asdf reshim
....

== Generate the code

Once all the tools are installed, run the next command to update the
final code interfaces:

[source,bash]
....
make
....

In order to make the last command work, `+protoc-gen-go+` and
`+protoc-gen-elixir+` must be available in your PATH system variable
(they are if they are installed using the previously explained `+asdf+`
option).