File: building.rst

package info (click to toggle)
fastd 21-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,664 kB
  • sloc: asm: 15,114; ansic: 9,737; yacc: 584; sh: 561; makefile: 160; python: 34; perl: 11
file content (46 lines) | stat: -rw-r--r-- 1,348 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Building fastd
==============

Dependencies
~~~~~~~~~~~~

* libuecc (>= v6; >= v7 recommended; developed together with fastd)
* libsodium or NaCl (for most crypto methods)
* bison (>= 2.6)
* pkg-config

Optional:

* libcap (if ``capabilities`` is enabled; Linux only; can be disabled if you don't need POSIX capability support)
* libjson-c (if ``status_socket`` is enabled)
* libssl (if ``cipher_aes128-ctr`` is enabled)

Building
~~~~~~~~

Starting with v20, fastd uses the Meson build system.

::

    # Get fastd (or use the release tarballs)
    git clone https://github.com/NeoRaider/fastd.git

    # Set up a build dir
    meson setup fastd fastd-build -Dbuildtype=release
    cd fastd-build

    # Build fastd, binary can be found in the src subdir of the build dir
    ninja

    # Install in the system
    ninja install

Build settings
~~~~~~~~~~~~~~
The build can be configured using the command ``meson configure``; running it
without any additional arguments will show all available variables. Settings can
be passed to ``meson setup`` or ``meson configure`` using ``-DVARIABLE=VALUE``.

* By default, fastd will build against libsodium. If you want to use NaCl instead, add ``-Duse_nacl=true``
* If you have a recent enough toolchain (GCC 4.8 or higher recommended), you can enable link-time optimization by
  adding ``-Db_lto=true``