uds-daemon-example is a minimal demonstration project that shows how to implement a systemd socket-activated daemon using Unix Domain Sockets (UDS).
It includes structured logging using spdlog and integrates seamlessly with systemd service and socket units.
- Daemon only starts when a client connects to the Unix domain socket
- Fully managed and monitored by systemd
- High-performance logging with spdlog
- Uses external fmt formatting backend
- Builds for amd64 and arm64
- Debian packaging ready for cross-build workflows
- Used to trigger activation and test the daemon behavior
This project provides a Makefile to build for multiple architectures and to create Debian packages.
All builds are designed to run inside a container environment defined via podman-compose.
Available build types are: You can build both natively and as Debian packages:
| Target | Architecture | Build type | Command |
|---|---|---|---|
amd64-Release |
amd64 | Release binary | make amd64-Release |
amd64-Debug |
amd64 | Debug binary | make amd64-Debug |
arm64-Release |
arm64 | Release (cross) | make arm64-Release |
arm64-Debug |
arm64 | Debug (cross) | make arm64-Debug |
.deb package |
amd64 | Debian package | make amd64-debbuild |
.deb package |
arm64 | Debian package (cross) | make arm64-debbuild |
Before building uds-daemon-example, make sure the following system packages are installed:
podmanpodman-compose(install globally via pip):
By default, running any target will build inside the configured builder container: To create the configured builder container run:
make builderTo build for arm64 (cross-compiled):
make amd64-Release
make arm64-ReleaseCleaning Builds
To force a clean re-build, add CLEAN=1:
make amd64-Release CLEAN=1Debian Package Builds
make amd64-debbuild
make arm64-debbuild