Haskell bindings to libssh
Find a file
2024-06-19 15:37:37 +03:00
Network Fix the ssh_connect function name in exceptions 2024-06-18 17:48:44 +03:00
libssh.cabal Specify upper bounds for the dependencies 2024-06-19 15:37:37 +03:00
LICENSE Add the initial version 2024-06-17 23:02:01 +03:00
README Add bindings to more functions 2024-06-18 10:47:12 +03:00

Haskell bindings to the libssh library

The bindings are not complete (though maybe will get there): they are
composed primarily to fetch files over SFTP, since other available
options had issues with that. In particular, when downloading hundreds
of files per hour, over hundreds of connections (with dozens of those
simultaneously), in a long-running process, the following was
observed:

- SSHFS 2.8 quits without leaving a trace, and does not seem to be
  actively maintained.

- Haskell curl bindings lead to memory leaks, possibly because curl
  uses libssh2, which leaks (see below).

- libssh2 1.7.0 (on Debian 9) and 1.9.0 (on Debian 11) appears to leak
  memory, even after leaks in its Haskell bindings are fixed.

- libssh 0.7.3 (on Debian 9) seems to enter an infinite loop in
  sftp_open occasionally, with high CPU load, but version 0.9.8 (on
  Debian 11) does not.


The "discarded-qualifiers" warnings happen during the build because of
the GHC issue 22043, but ConstPtr was introduced recently, so using it
would break compatibility with base versions that are still in use.

The bindings are compatible with libssh versions 0.7.3, 0.9.8, 0.10.6.