13 releases (breaking)

0.35.1 Aug 31, 2024
0.35.0 May 17, 2024
0.34.1 Mar 9, 2024
0.31.0 Oct 27, 2023
0.25.0 Apr 1, 2021

#808 in Parser implementations

Download history 383/week @ 2024-08-03 734/week @ 2024-08-10 468/week @ 2024-08-17 851/week @ 2024-08-24 1023/week @ 2024-08-31 537/week @ 2024-09-07 693/week @ 2024-09-14 687/week @ 2024-09-21 786/week @ 2024-09-28 725/week @ 2024-10-05 897/week @ 2024-10-12 748/week @ 2024-10-19 721/week @ 2024-10-26 650/week @ 2024-11-02 875/week @ 2024-11-09 1204/week @ 2024-11-16

3,562 downloads per month
Used in 15 crates (11 directly)

LGPL-2.0-or-later

9.5MB
72K SLoC

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


lib.rs:

IPC mechanisms for Sequoia.

This crate implements IPC mechanisms to communicate with Sequoia 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–27MB
~398K SLoC