Building on GNU/Linux

Getting a copy of the code

The Donet software repository is hosted on GitLab, and mirrored to GitHub. You can get a copy of the repository on your local machine by using Git to clone the repo.

On your computer, clone with:

$ git clone https://gitlab.com/donet-server/donet.git

Building from source

Donet uses Meson as the build system, which in turn calls Cargo.

The quickest way to build for debug is to do the following:

Run the following Meson commands under the project directory:

$ meson setup build -Dprofile=debug
$ meson compile -C build

Note

The instructions above will compile the Donet project and its crates without optimizations and includes more verbose logging. To build Donet for release, simply remove -Dprofile=debug.

If you are working on a contribution to either the Donet daemon or libdonet, please run code linting and unit testing before pushing:

$ meson compile linting -C build
$ meson compile tests -C build

These checks should go over all source files in the donet/ and libdonet/ source directories.

Tip

If you would like to build only certain Donet services into the output binary, you can use the available Meson options to trigger feature flags in the Crate:

$ meson setup build -Dbuild_state_server=true

If any build_* Meson options are passed, --no-default-features is passed to cargo build, which disables building all services. Only the service(s) that you explicitly request to be built will be activated via feature flags.