Skip to content

Latest commit

 

History

History
 
 

contributing-code-prerequisites

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Repository Prerequisites

This page lists the prerequisites for working with the repository. The core components of Drasi are written in Rust, the CLI tool is written in Go and several Source/Reaction implementations are written in various other languages. Specific instructions for each Source or Reaction can be found in the local readme files.

Depending on the task you need to perform, you may need to install more tools, but basic prerequisites should be sufficient for most contributors to get started.

Operating system

We support developing on macOS, Linux and Windows.

Development environment

Contributing to Drasi requires several tools to get started.

Local installation

This is the list of core dependencies to install for the most common tasks. In general we expect all contributors to have all of these tools present:

For make we advice the following installation steps depending on you OS.

Linux

Install the build-essential package:

sudo apt-get install build-essential

Mac

Using Xcode:

xcode-select --install

Using Homebrew:

brew install make

Windows

Using Chocolatey

choco install make

Repo Setup

  1. Fork the repo

  2. Clone the repo

    git clone <your fork>
    
  3. Initialize and update submodules (This is how the Query Host consumes drasi-core)

    git submodule init
    git submodule update
    
  4. Enable Git Hooks We use pre-commit hooks to catch some issues early, enable the local git hooks using the following commands

    chmod +x .githooks/pre-commit
    git config core.hooksPath .githooks
    

Additional tools

The following tools are required depending on the task at hand.

Kubernetes

Currently, the only way to run Drasi is on Kubernetes. To run Drasi you will need the ability to create a Kubernetes cluster as well as to install kubectl to control that cluster. There are many ways to create a Kubernetes cluster that you can use for development and testing. If you don't have a preference we recommend kind.

Troubleshooting kubernetes

You might want tools that can help debug Kubernetes problems and understand what's going on in the cluster. Here are some recommendations from the team:

Editors

You can choose whichever editor you are most comfortable for working on Rust code. If you don't have a code editor set up for Rust, we recommend VS Code.

Alternatively, you can choose whichever editor you are most comfortable for working on Rust code. Feel free to skip this section if you want to make another choice.

Drasi CLI

The Drasi CLI tool will be required in your development workflow to manage a Drasi instance that you may want to test against. You can either build it from source or download a pre-built binary.

Download the CLI for your platform, and add it to your system path: