posix-api: posix bindings

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

This library provides a very thin wrapper around POSIX APIs. It can be compiled on any operating system that implements the standard as specified in IEEE Std 1003.1 faithfully. It has similar goals as the unix package, but its design differs in several areas:

About a dozen other packages offers wrappers for some subset of the POSIX specification are strewn across hackage. They include `regex-posix`, `posix-paths`, `posix-timer`, `posix-socket`, `posix-filelock`, `posix-acl`, etc. This library differs from all off these in various ways. Here are some of the design guidelines followed here that distinguish this package from some or all of these others:

Unlike network, this sockets API in this library does not integrate sockets with GHC's event manager. This is geared toward an audience that understands how to use threadWaitRead and threadWaitWrite with unsafe FFI calls to avoid blocking the runtime.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.2.0.0, 0.2.0.0, 0.2.1.0, 0.3.0.0, 0.3.2.0, 0.3.3.0, 0.3.4.0, 0.3.5.0, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.6.0.0, 0.6.0.1, 0.6.1.0, 0.7.0.0, 0.7.1.0, 0.7.2.0
Change log CHANGELOG.md
Dependencies base (>=4.11.1 && <5), primitive (>=0.6.4) [details]
License BSD-3-Clause
Copyright 2018 Andrew Martin
Author Andrew Martin
Maintainer andrew.thaddeus@gmail.com
Category System
Home page https://github.com/andrewthad/posix-api
Uploaded by andrewthad at 2019-01-18T14:42:09Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for posix-api-0.2.0.0

[back to package description]

posix-api

Objective

This library provides minimal bindings to system calls for POSIX-compliant operating systems. All functions follow these design decisions:

Pull requests that add bindings to POSIX APIs in a way that agrees with these guidelines will be accepted. Unfortunately, there is some grey area when it comes to what a "minimal binding" to a function is. Discussion may sometimes be necessary to refine the guidelines.

Build Instructions

This library relies on a currently-unreleased version of hsc2hs in order to build. In order to try out this library, try:

~/dev $ git clone https://github.com/haskell/hsc2hs
~/dev $ cd hsc2hs
~/dev/hsc2hs $ cabal install
~/dev/hsc2hs $ cd ..
~/dev $ git clone https://github.com/andrewthad/posix-api
~/dev $ cd posix-api
~/dev/posix-api $ cabal new-build --with-hsc2hs=~/.cabal/bin/hsc2hs

This will build posix-api with the unreleased version of the hsc2hs tool.

Infelicities

This project currently includes some Linux-specific code. It in the the Linux.Socket. The plan is to eventually move the Linux.Socket module into its own library. Currently, a ton of POSIX APIs are missing. These should be included.