Skip to content

Automatic compilation of native libraries for the Signal messenger

License

Notifications You must be signed in to change notification settings

exquo/signal-libs-build

Repository files navigation

Automatic compilation of native libraries for the Signal messenger.

What it is

A CI/CD workflow to automatically compile libsignal, which is used by signal-cli and other projects. This rust library needs to be built for each operating system and processor architecture where it is used. This repo provides pre-compiled binaries for some of the popular platforms.

How to use it

With signal-cli

The compiled library files (.so / .dylib / .dll) can be incorporated into signal-cli according to the instructions on its wiki. For Linux, this amounts to swapping the .so files inside the .jar archives.

For example, for signal-cli v0.11.6 on ARM64, download signal-cli-0.11.6-Linux.tar.gz from signal-cli's releases and libsignal_jni.so-v0.21.1-aarch64-unknown-linux-gnu.tar.gz from this repo's releases. Unpack downloaded files with tar -xzf ….tar.gz. Then replace the bundled .so object:

zip -uj signal-cli-0.11.6/lib/libsignal-client-0.21.1.jar libsignal_jni.so

How it works

The workflow automatically checks for new releases in https://github.com/signalapp/libsignal repo. If one is available, it downloads and builds the native library objects.

Security

The files published in this repo's releases are compiled and uploaded by GitHub's CI infrastructure, following the steps in the workflow files. The github-actions bot authors every release. Additionally, a SHA checksum of every compiled file is printed out to the logs during the workflow run.

This means that the resulting binaries can be used with confidence that they were built by GitHub Actions by executing instructions in the open-source workflow files.

Available platforms

  • x86_64-linux-gnu Most desktop linuxes. Debain 10 is supported (whereas the upstream releases are built on the latest Ubuntu and might require a newer glibc version; see signal-cli#643).
  • x86_64-apple-darwin MacOS, Intel 64 bit.
  • x86_64-pc-windows Windows, 64 bit.
  • aarch64-apple-darwin MacOS, ARM64.
  • aarch64-linux-gnu Raspberry Pi 3,4; Pine A64; many SoC.
  • armv7-linux-gnueabihf Raspberry Pi 2; many SoC.
  • i686-linux-gnu 32 bit Linux.
  • x86_64-linux-musl Alpine Linux, OpenWRT; see note.

Tip: on *nix, use uname -m to get your device's architecture.

Historical notes

  • As of signal-cli v0.10.3, the macOS and Windows builds are bundled into the official releases.

  • As of libsignal-client v0.10.0, builds for x86_64 macOS and Windows are available in the upstream releases, along with the usual Linux builds.

  • As of libsignal-client v0.10.0, the zkgroup library is now incorporated into the libsignal-client.

Similar projects

Manual builds for Raspberry Pi: