An open API service indexing awesome lists of open source software.

https://github.com/snaipe/x-nix

A linux compatibility layer for multiple platforms
https://github.com/snaipe/x-nix

Last synced: 2 months ago
JSON representation

A linux compatibility layer for multiple platforms

Awesome Lists containing this project

README

        

# ❌-nix

## What is ❌-nix ?

**WARNING:** This library is still experimental. Use with care!

❌-nix (or "cross-nix") is a header-only C library meant to provide a
linux compatibility layer on top of other platforms by including
the right headers or implementing the right functions.

Its end goal is to expose an unified interface for Linux, OS X, and Windows.

## Is ❌-nix for me ?

❌-nix is for you if:
* you want to make your software available on multiple platforms but keep
some linux-specific features
* you want a compatibility layer rather than an emulated environment
* you can afford to recompile your software on the target platform

## How do I use it ?

Add the `x-nix` directory to your include path, and simply add at the begining
of your source file:

```c
#include
```

Or, if you want to only add some of the features, include any of the following:

```c
#include // pid_t, getpid
#include // wait, waitpid
#include // pipe
#include // clock_gettime
```

## Acknowledgements

Here are some cool alternatives to ❌-nix, with some similarities and differences:

### [Cygwin](http://cygwin.com)

Cygwin a reimplementation of the linux API on top of the windows API -- however,
it requires you to use the Cygwin toolchain and environment to compile
and run your software.

### [Foreign linux](https://github.com/wishstudio/flinux)

Foreign linux is a binary translator that allows you to run unmodified
linux binaries on windows.