mono / mono.posix

POSIX/Unix interface for Mono, .NET and .NET Core. Provides functionality for managed code to access POSIX/Unix features not accessible via the BCL. This repository supersedes the older code in https://github.com/mono/mono
MIT License
42 stars 10 forks source link
dotnet mono posix unix

Build status

Build Status

Table of Contents

Mono.Posix standalone repository

This repository contains Mono.Posix sources imported from the Mono repository in order to continue active maintenance and development of the assembly and its support library outside Mono proper. The goal is to make the assembly available as a universal nuget that works across a number of Unix and Unix-like systems.

This repository should be treated as the "canonical" source of Mono.Posix - all new code, bug fixes etc should be implemented here. Mono copy of the code will not receive any new updates or fixes.

Supported operating systems

While the native and managed code in this repository should work fine across the entire spectrum of Unix and Unix-like systems, the only supported operating systems are the following:

Builds for Linux and macOS produce static and dynamic libraries, all the other builds produce only static libraries. Dynamic libraries do not have any additional dependencies except for the C library.

The *BSD family of Unix operating system is not officially supported because we have no infrastructure to automatically run and test Mono.Posix on these systems. However, we will gladly accept any PRs which fix issues with these systems, implement new functionality specific to these systems etc.

Supported managed target frameworks

Build requirements

Source imports

Repository contains Mono.Posix and its native sources helper sources imported from the https://github.com/mono/mono/ repository, commit 0bc0f6bef0c05d3367c82d2e414e9db256ae1541

The src/Mono.Posix directory here corresponds to mcs/class/Mono.Posix/ in the Mono repository.

The src/native directory here corresponds to support/ in the Mono repository

Source changes relative to Mono sources

Native code

All the native code was migrated to C++ (using C++17 standard) and all functions not used by the managed code were removed. As the result of this migration, the native code uses stronger typing and stricter compile-time error checking.

Managed code

Mono.Posix.dll is now obsolete, with all the code that used to be in it moved to the new Mono.Unix.dll assembly. Mono.Posix.dll contains only type forwarders for the moved types and a handful of classes which were previously marked obsolete - they will now produce build errors instead of warnings, if used by the application referencing the new Mono.Posix.

TODO