Skip to content

Latest commit

 

History

History

musl

XenoAtom.Interop.musl Build Status NuGet

This package provides a low-level and modern .NET P/Invoke wrapper around the musl libc library for accessing low-level sys kernel functions.

♻️ XenoAtom.Interop

This package is part of the XenoAtom.Interop project.

musl libc is an implementation of the C standard library providing access to the Linux kernel syscalls. For more information, see musl website.

💻 Usage

After installing the package, you can access the library through the static class XenoAtom.Interop.musl.

For more information, see the official documentation at https://musl.libc.org/manual.html.

Example of using this library in C#:

using static XenoAtom.Interop.musl;

var ret = mkdir("test_directory", S_IRWXU | S_IRWXG | S_IRWXO);
if (ret == -1)
{
    var lerrno = errno;
    // ...
}

Notice that is library requires the library musl to be installed on the target system. This library is only supported on Linux.

This library is available by default on Alpine Linux. For other distributions, you will need to install the musl package.

📦 Compatible Native Binaries

This library does not provide C native binaries but only P/Invoke .NET bindings to musl 1.2.4_git20230717-r4.

If the native library is already installed on your system, check the version installed. If you are using this library on Alpine Linux, see the compatible version in the Supported API section below. Other OS might require a different setup.

📚 Supported API

This package is based on the following header version:

  • musl C include headers: musl-dev
  • Version: 1.2.4_git20230717-r4
  • Distribution: AlpineLinux v3.19

The following API were automatically generated from the C/C++ code:

🪪 License

This software is released under the BSD-2-Clause license.

🤗 Author

Alexandre Mutel aka xoofx.