Enx.Systemd 0.0.2-alpha

This is a prerelease version of Enx.Systemd.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Enx.Systemd --version 0.0.2-alpha
                    
NuGet\Install-Package Enx.Systemd -Version 0.0.2-alpha
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Enx.Systemd" Version="0.0.2-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Enx.Systemd" Version="0.0.2-alpha" />
                    
Directory.Packages.props
<PackageReference Include="Enx.Systemd" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Enx.Systemd --version 0.0.2-alpha
                    
#r "nuget: Enx.Systemd, 0.0.2-alpha"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Enx.Systemd@0.0.2-alpha
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Enx.Systemd&version=0.0.2-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Enx.Systemd&version=0.0.2-alpha&prerelease
                    
Install as a Cake Tool

Enx.Systemd

Status: ALPHA – API not stable yet

Enx.Systemd is a .NET library that provides modern, type-safe access to systemd APIs from C#.

The goal of this project is to offer clean, idiomatic .NET bindings over systemd, built on top of:

  • LibraryImport (source-generated P/Invoke)
  • explicit ownership and memory-safe patterns
  • minimal abstractions over the native APIs

At the moment, the library focuses on sd-device, allowing inspection and traversal of Linux devices through systemd’s device model.


✨ Features

  • Access systemd sd-device API from .NET
  • Safe handling of native resources (SafeHandle)
  • Explicit and predictable memory ownership
  • UTF-8–correct string marshalling
  • Designed for Linux-first tooling and system-level applications

🚧 Current State

This project is in early development (ALPHA).

  • Only a subset of sd-device is currently implemented
  • APIs may change without notice
  • Documentation is minimal and evolving

That said, the core interop layer is already functional and used in real-world experiments.


🎯 Motivation

Systemd exposes powerful low-level APIs, but consuming them safely from .NET is non-trivial.

Enx.Systemd aims to:

  • remove the pain of P/Invoke boilerplate
  • avoid hidden runtime marshalling
  • make systemd APIs usable in modern .NET applications

Typical use cases include:

  • hardware inspection tools
  • device management utilities
  • Linux desktop tooling
  • system-level diagnostics

🐧 Platform Support

  • Linux only
  • Requires systemd and libsystemd

Other platforms are intentionally not supported.


🔮 Roadmap (high-level)

  • Extend sd-device coverage
  • Add bindings for other systemd components
  • Improve documentation and examples
  • Stabilize the public API

⚠️ Disclaimer

This project is not affiliated with systemd.

Use at your own risk — especially in production environments.


🤝 Contributing

Feedback, issues, and experiments are welcome. Expect breaking changes while the project is in alpha.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.3-alpha 67 12/27/2025
0.0.2-alpha 96 12/20/2025
0.0.1-alpha 80 12/12/2025