9 breaking releases

0.34.1 Mar 9, 2024
0.33.0 Feb 20, 2024
0.31.0 Oct 27, 2023
0.30.1 Feb 2, 2023
0.25.0 Apr 1, 2021

#146 in Network programming

Download history 89/week @ 2023-12-21 10/week @ 2023-12-28 43/week @ 2024-01-04 198/week @ 2024-01-11 355/week @ 2024-01-18 154/week @ 2024-01-25 141/week @ 2024-02-01 180/week @ 2024-02-08 749/week @ 2024-02-15 400/week @ 2024-02-22 647/week @ 2024-02-29 1025/week @ 2024-03-07 582/week @ 2024-03-14 428/week @ 2024-03-21 283/week @ 2024-03-28 346/week @ 2024-04-04

1,764 downloads per month
Used in 12 crates (9 directly)

LGPL-2.0-or-later

9.5MB
70K SLoC

This crate implements IPC mechanisms to communicate with Sequoia and GnuPG background services.


lib.rs:

IPC mechanisms for Sequoia.

This crate implements IPC mechanisms to communicate with Sequoia and GnuPG background services.

Rationale

Sequoia makes use of background services e.g. for managing and updating public keys.

Design

We use the filesystem as namespace to discover services. Every service has a file called rendezvous point. Access to this file is serialized using file locking. This file contains a socket address and a cookie that we use to connect to the server and authenticate us. If the file does not exist, is malformed, or does not point to a usable server, we start a new one on demand.

This design mimics Unix sockets, but works on Windows too.

External vs internal servers

These servers can be either in external processes, or co-located within the current process. We will first start an external process, and fall back to starting a thread instead.

Using an external process is the preferred option. It allows us to continuously update the keys in the keystore, for example. It also means that we do not spawn a thread in your process, which is frowned upon for various reasons.

Please see IPCPolicy for more information.

Dependencies

~13–28MB
~427K SLoC