Skip to content

Trento contracts for message exchange

Notifications You must be signed in to change notification settings

trento-project/contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trento Contracts

How to generate the interfaces

Follow the next steps in order to generate the final code interfaces from the protobuf definitions.

Pre-requirements

  • Install asdf and add all the needed plugins:
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:
golang 1.18.1
  • Install the required tool versions running:
asdf install
  • Install and configure protoc-gen-elixir running:
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:

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).