Skip to content

Add support for systemd socket activation#360

Merged
jevolk merged 3 commits into
matrix-construct:mainfrom
ventureoo:systemd-socket-activation
Mar 10, 2026
Merged

Add support for systemd socket activation#360
jevolk merged 3 commits into
matrix-construct:mainfrom
ventureoo:systemd-socket-activation

Conversation

@ventureoo
Copy link
Copy Markdown
Contributor

I decided to use sd_notify crate because it is already used in the codebase. Also note that this does not take into account activation of Unix sockets via systemd, as I am not sure how best to implement this given that tuwunel implies using only one Unix socket, whereas systemd allows multiple. But since the main use-case is TCP sockets, it works just fine for me.

Closes: #355

P. S. I’m a bit new to Rust, so feel free to say if this code is really bad.

@x86pup x86pup added the feature New feature or functionality that didn't exist. label Mar 8, 2026
Co-authored-by: Jason Volk <jason@zemos.net>
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
@ventureoo ventureoo force-pushed the systemd-socket-activation branch from cf8dcf5 to f3db71b Compare March 9, 2026 19:10
@ventureoo
Copy link
Copy Markdown
Contributor Author

v2: I think I’ve fixed compilation on systemd-free targets and also squash the formatting fixes made by @jevolk (thanks for that!)

@jevolk
Copy link
Copy Markdown
Member

jevolk commented Mar 9, 2026

v2: I think I’ve fixed compilation on systemd-free targets and also squash the formatting fixes made by @jevolk (thanks for that!)

Yes that's what I was going to ask for thank you!

Signed-off-by: Jason Volk <jason@zemos.net>
@jevolk jevolk force-pushed the systemd-socket-activation branch from 883507d to 65cd9e9 Compare March 10, 2026 01:27
Signed-off-by: Jason Volk <jason@zemos.net>
@jevolk jevolk force-pushed the systemd-socket-activation branch from 65cd9e9 to aa847e4 Compare March 10, 2026 02:34
@jevolk jevolk merged commit b5b6e3f into matrix-construct:main Mar 10, 2026
164 of 169 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or functionality that didn't exist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Add support for systemd socket activation

3 participants