Skip to content

Getting a working environment

We'll now introduce how to set up a working environment, both as a user, just downloading a binary distribution, or as a developer, installing orchestra, our package manager.

Installing as a user#

It should be as simple as:

$ curl -L -s | bash

You can now use revng as follows:

$ cd revng
$ ./revng artifact

Alternatively, you can set the environment so you don't need to do ./revng bug just revng:

$ cd revng
$ source ./environment
$ revng artifact

The rest of the documentation assumes you performed the last set of commands.

Installing as a developer#

In order to get a working development environment, you need to install our package manager, orchestra.

First of all, let's clone the orchestra configuration:

$ git clone
Cloning into 'orchestra'...
$ cd orchestra

Let's now install the actual package manager application, revng-orchestra.
You can either install it globally for the current user or in a virtualenv.

Install globally for the current user
$ python3 -m pip install --user --force-reinstall
$ export PATH="$HOME/.local/bin:$PATH"
Install in a virtualenv
$ python -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip wheel certifi
$ pip install

At this point, from the orchestra repository, we can sync all the information with the remote repositories:

$ orc update

Currently, is split in two repositories revng, containing infrastructure and the lifter, and revng-c containing the backend of the decompiler, the part actually emitting the C code. These two repos will eventually get merged.

To install revng, revng-c and its dependencies from the binary archives run the following command:

$ orc install revng revng-c

Now you can enter the environment where you can use revng:

$ orc shell
$ revng artifact

The rest of the documentation assumes you're in an orc shell.

Building from source#

In order to build from source, add the following to .orchestra/config/user_options.yml:

--- a/.orchestra/config/user_options.yml
+++ b/.orchestra/config/user_options.yml
@@ -11,6 +11,6 @@
   - origin: ""

-#! #@overlay/replace
-#! build_from_source:
-#!   - component-name
+  - revng
+  - revng-c

We can now install and test revng and revng-c:

$ orc install --test revng revng-c

This will clone the sources into sources/revng and sources/revng-c, build them, install them (in root/) and run the test suites.