A Rust version of the libsignal-service-java library which implements the core functionality to communicate with Signal servers. It is based on the official Rust version of libsignal
Usage of this library is not as straight-forward as with any other Rust library as it only provides some primitives.
For a higher-level library that helps you immediately get started with implementing a Signal client in Rust, you might want to have a look at Presage, which implements the traits of this library as well as local storage.
libsignal-service depends on a forked version of curve25519-dalek,
which might conflict with other instances/forks of the library.
We advise you override all instances of said library through a patch-section.
The example below serves as an example of how this library can be included in Cargo.toml:
[dependencies]
libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs", branch = "main" }
libsignal-protocol = { git = "https://github.com/signalapp/libsignal-client", branch = "main" }
zkgroup = { version = "0.9.0", git = "https://github.com/signalapp/libsignal-client", branch = "main" }
[patch.crates-io]
"curve25519-dalek" = { git = "https://github.com/signalapp/curve25519-dalek", tag = "signal-curve25519-4.0.0" }If you're using a Cargo workspace, you should add the [patch.crates.io] section in the root Cargo.toml file instead.
Additionally, if you want to make use of the CDSI support (phone number lookup), you should enable the cdsi feature (enabled by default).
This pulls in libsignal-net and its transitive dependencies.
The optional, non-default phonenumber feature pulls in the phonenumber crate,
which offers a more comprehensive suite of phonenumber validation routines and conversions.
libsignal-protocol is the core library that implements the Signal protocol, and it has a minimum supported Rust version (MSRV) of Rust 1.89 and therefore dictates the MSRV of libsignal-service-rs.
libsignal-service-rs is also at the core of Whisperfish, a SailfishOS application. The SailfishOS Rust compiler updates seldomly, and since it currently is Rust 1.75, we have to support that version as well by the mean of a fork of libsignal-protocol that is compatible with Rust 1.75.
We're actively trying to make libsignal-service-rs fully functional.
If you're looking to contribute or want to ask a question, you're more than welcome to join our development channel on Matrix (#whisperfish:rubdos.be) or Libera.chat (#whisperfish) to get in touch with us!
Copyright 2015-2019 Open Whisper Systems
Copyright 2020-2023 Signal Messenger, LLC
Copyright 2019-2021 Michael F Bryan
Copyright 2019-2025 Ruben De Smet
Copyright 2019-2025 Gabriel Féron
Copyright 2019-2025 Whisperfish contributors
Licensed under the AGPLv3: http://www.gnu.org/licenses/agpl-3.0.html
Additional Permissions For Submission to Apple App Store: Provided that you are otherwise in compliance with the GPLv3 for each covered work you convey (including without limitation making the Corresponding Source available in compliance with Section 6 of the GPLv3), Open Whisper Systems also grants you the additional permission to convey through the Apple App Store non-source executable versions of the Program as incorporated into each applicable covered work as Executable Versions only under the Mozilla Public License version 2.0 (https://www.mozilla.org/en-US/MPL/2.0/).