#shell #terminal #tmux #tty #terminal-session #persistence #networking

libshpool

libshpool contains the implementation of the shpool tool, which provides a mechanism for establishing lightweight persistant shell sessions to gracefully handle network disconnects

8 unstable releases (3 breaking)

0.8.0 Oct 15, 2024
0.7.1 Sep 16, 2024
0.6.3 Jul 9, 2024
0.6.2 Jun 11, 2024
0.5.0 Feb 28, 2024

#1284 in Network programming

Download history 6/week @ 2024-07-29 5/week @ 2024-08-05 9/week @ 2024-08-26 166/week @ 2024-09-02 16/week @ 2024-09-09 190/week @ 2024-09-16 51/week @ 2024-09-23 26/week @ 2024-09-30 16/week @ 2024-10-07 213/week @ 2024-10-14 27/week @ 2024-10-21 7/week @ 2024-10-28 9/week @ 2024-11-04

258 downloads per month
Used in shpool

Apache-2.0

310KB
5.5K SLoC

libshpool

libshpool contains the meat of the implementation for the shpool command line tool. You almost certainly don't want to be using it directly, but with it you can create a wrapper binary. It mostly exists because we want to add monitoring to an internal google version of the tool, but don't believe that telemetry belongs in an open-source tool. Other potential use-cases such as incorporating a shpool daemon into an IDE that hosts remote terminals could be imagined though.

Integrating

In order to call libshpool, you must keep a few things in mind. In spirit, you just need to call libshpool::run(libshpoo::Args::parse()), but you need to take care of a few things manually.

  1. Handle the version subcommand. Since libshpool is a library, the output will not be very good if the library handles the versioning.
  2. Depend on the motd crate and call motd::handle_reexec() in your main function.

Dependencies

~10–21MB
~322K SLoC