This page explains how to get Tremor running on a local system for development or testing. There are 2 ways of installing Tremor:
- Installing Tremor on the system without Docker.
- Using Docker.
Tremor can be run on any platform without using Docker by installing the Rust ecosystem. To install the Rust ecosystem, you can use rustup, which is a toolchain installer.
rustup will install all the necessary tools required for Rust, which includes
rustc (the compiler) and
Cargo (package manager).
Tremor is built using the latest stable toolchain, so when asked to select the toolchain during installation, select
Run the following command and follow the on-screen instructions:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Now, activate it by adding
source $HOME/.cargo/env to your
.rc file, and open a new console.
For building Tremor on macOS, you also need to install xcode and the commandline tools.
Pre-requisite: Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later. You can get those from: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019. During installation, make sure Windows 10 SDK is selected (should be on by default).
Now, download the
rustup installer by clicking here. Run it, and follow the on-screen instructions.
brew install cmake
sudo apt install libssl-dev libclang-dev cmake
- cmake: choose the latest stable release (3.16 at the time of writing).
- clang: choose Windows pre-built binaries for the latest release that has it (9.0.0 at the time of writing).
Make sure the
llvm binaries are added to the system path for at least the current user (if not all), as part of the installation process.
openssl does not provided official builds, you can get it via vcpkg.
First, set up
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg integrate install # hook up user-wide integration
.\vcpkg install openssl:x64-windows-static
To pick up the openssl libs during the Tremor build, you also have to set the
OPENSSL_DIR environment variable right now. Example:
Technically, the Rust openssl crate will try to discover the
openssl libs via vcpkg (as long as env var
VCPKGRS_DYNAMIC is set), but that is not working for the recent
openssl libs supplied by
vcpkg. There's a fix for it and once that lands in a release for
rust-openssl (and also starts getting used by Tremor dependencies), we won't have to rely on the
After installing Rust and cloning the repository, you can start the Tremor server by running the following from the root (
cargo run -p tremor-cli -- server run
And to run the test suite, you can run:
This will run all the tests in the suite, except those which are feature-gated and not needed to quickly test Tremor.
Rustfmt is a tool for formatting Rust code according to style guidelines. It maintains consistency in the style in the entire project.
rustup component add rustfmt
rustfmt on the project, run the following command:
Clippy is a linting tool that catches common mistakes and improves the rust code. It is available as a toolchain component and can be installed by running:
rustup component add clippy
clippy, run the following command:
Rustfix automatically applies suggestions made by
rustc. There are two ways of using
rustfix- either by adding it as a library to
Cargo.toml or by installing it as a cargo subcommand by running:
cargo install cargo-fix
To run it, you can run:
Cargo tree is a subcommand that visualizes a crate's dependency-graph and display a tree structure of them. To install it:
cargo install cargo-tree
To run it:
Flamegraph is a profiling tool that visualises where time is spent in a program. It generates a SVG image based on the current location of the code and the function that were called to get there.
To install it:
cargo install cargo-flamegraph
To run it:
Tremor contains integration tests that test it from a user's perspective. To run the integration tests you can run:
Tremor contains a
Dockerfile which makes it easier to run and build using docker. It also contains a Makefile so that common Docker commands.
Make sure Docker has at least 4GB of memory.
To build Tremor, you can run:
To run the images: