libsystemd-like functionality in native ocaml
Go to file
xenia e19bcf7ff7 add readme 2024-09-24 14:14:59 -04:00
bin rename to systemd-ml 2024-09-24 13:46:42 -04:00
lib rename to systemd-ml 2024-09-24 13:46:42 -04:00
lib_main rename to systemd-ml 2024-09-24 13:46:42 -04:00
lib_xlog rename to systemd-ml 2024-09-24 13:46:42 -04:00
test initial commit 2024-09-24 04:23:56 -04:00
.gitignore initial commit 2024-09-24 04:23:56 -04:00
README.md add readme 2024-09-24 14:14:59 -04:00
dune-project meow 2024-09-24 13:51:51 -04:00
package.nix initial commit 2024-09-24 04:23:56 -04:00
shell.nix initial commit 2024-09-24 04:23:56 -04:00
systemd-ml.opam meow 2024-09-24 13:51:51 -04:00

README.md

systemd-ml

systemd-ml provides libsystemd-like functionality for interacting with the systemd service manager, in self-contained ocaml code (with a bit of C). systemd-ml is integrated with eio, which provides for use in eio-based daemons

Unfortunately, systemd-ml currently assumes usage of the eio_linux backend. It's hard to make code backend-agnostic because not enough functionality around Unix domain sockets is exposed by the high-level eio APIs, necessitating use of the low-level backend APIs. Therefore, it does not currently work on eio_posix, though future support is possible. Support for eio_windows is not planned, since there is no systemd port for windows.

Additionally, some functionality that would be useful for systemd integration is currently not possible without library patches. This currently includes functionality for responding to memory pressure events.

  • systemd-ml with entry module Systemd is the main library
  • systemd-ml.xlog with entry module Systemd_xlog configures xlog to send log messages to journald
  • systemd-ml.main with entry module Systemd_main provdes a convenience function Systemd_main.run which handles common boilerplate operations for Type=notify or Type=notify-reload daemons with xlog output to journald

Also note that per the license field in the package info, this package is not currently open source. If you have questions about this you should contact me

Features

features that would be nice to have but unfortunately require patches (eio does not currently support polling for POLLPRI)