Skip to main content

Build from sources

The following guide will explain how to build Pulsar from sources, please read it carefully.

Preparation

First install Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Clone the repository and enter the directory:

git clone https://github.com/Exein-io/pulsar.git
cd pulsar

Then continue choosing one of the folowing methods.

The recommended way to build Pulsar is using cross. cross uses a container to build the project, so Docker or Podman are required. Check the official cross documentation if you have any issues.

Install cross:

cargo install cross

Then build the project:

cross build --release

Method 2: Native

Prerequisites

You need to install some prerequisite packages in order to build and test Pulsar, in particular you need:

  • Clang: for BPF compilation
  • LLVM: for llvm-strip usage to strip BPF binaries

This example is based on Ubuntu, for other Linux distributions please replace the package manager and package name.

apt install clang llvm
caution

You need to install Clang/LLVM 13 or above.

Compile

After you have installed the required dependencies you can compile:

cargo build --release