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.
We support developing on macOS, Linux and Windows.
Contributing to Drasi requires several tools to get started.
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.
Install the build-essential
package:
sudo apt-get install build-essential
Using Xcode:
xcode-select --install
Using Homebrew:
brew install make
Using Chocolatey
choco install make
-
Fork the repo
-
Clone the repo
git clone <your fork>
-
Initialize and update submodules (This is how the Query Host consumes
drasi-core
)git submodule init git submodule update
-
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
The following tools are required depending on the task at hand.
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
.
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:
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.
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: