All Projects → luaposix → Luaposix

luaposix / Luaposix

Licence: mit
Lua bindings for POSIX APIs

Programming Languages

c
50402 projects - #5 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to Luaposix

Python Atomicwrites
Powerful Python library for atomic file writes.
Stars: ✭ 253 (-35.62%)
Mutual labels:  posix
Luvit
Lua + libUV + jIT = pure awesomesauce
Stars: ✭ 3,443 (+776.08%)
Mutual labels:  luajit
Ok.sh
A Bourne shell GitHub API client library focused on interfacing with shell scripts
Stars: ✭ 365 (-7.12%)
Mutual labels:  posix
Lua Resty Mlcache
Layered caching library for OpenResty
Stars: ✭ 274 (-30.28%)
Mutual labels:  luajit
Castl
JavaScript to Lua compiler with runtime library.
Stars: ✭ 323 (-17.81%)
Mutual labels:  luajit
Apioak
Full Lifecycle Management API Gateway.
Stars: ✭ 335 (-14.76%)
Mutual labels:  luajit
ext-psi
PHP System Interface (aka FFI)
Stars: ✭ 24 (-93.89%)
Mutual labels:  posix
Filer
Node-like file system for browsers
Stars: ✭ 389 (-1.02%)
Mutual labels:  posix
Reproc
A cross-platform (C99/C++11) process library
Stars: ✭ 325 (-17.3%)
Mutual labels:  posix
Neogfx
Cross-platform GPU-oriented C++ application/game framework
Stars: ✭ 362 (-7.89%)
Mutual labels:  luajit
Luajit.io
luajit io framework
Stars: ✭ 277 (-29.52%)
Mutual labels:  luajit
Lua re
reverse engineering for lua(lua/luac/luajit/lua_dec/lua_loader/lua_proc)
Stars: ✭ 299 (-23.92%)
Mutual labels:  luajit
Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+900.51%)
Mutual labels:  posix
Snabb
Snabb: Simple and fast packet networking
Stars: ✭ 2,782 (+607.89%)
Mutual labels:  luajit
Sh
A shell parser, formatter, and interpreter with bash support; includes shfmt
Stars: ✭ 4,343 (+1005.09%)
Mutual labels:  posix
Cloudlibc
CloudABI's standard C library
Stars: ✭ 254 (-35.37%)
Mutual labels:  posix
Format Udf
Bash script to format a block device (hard drive or Flash drive) in UDF. The output is a drive that can be used for reading/writing across multiple operating system families: Windows, macOS, and Linux. This script should be capable of running in macOS or in Linux.
Stars: ✭ 333 (-15.27%)
Mutual labels:  posix
Sysbench
Scriptable database and system performance benchmark
Stars: ✭ 4,268 (+986.01%)
Mutual labels:  luajit
Mrsh
A minimal POSIX shell
Stars: ✭ 381 (-3.05%)
Mutual labels:  posix
Ecominit
eComInit is a free init system and service manager designed to scale from lightweight desktops to web-scale cloud deployments. It aims to offer feature-parity with systemd but with a modular, portable architecture compliant with software engineering best-practice.
Stars: ✭ 352 (-10.43%)
Mutual labels:  posix

luaposix

By the luaposix project

License travis-ci status codecov.io

This is a POSIX binding for LuaJIT, Lua 5.1, 5.2, 5.3 and 5.4; like most libraries it simply binds to C APIs on the underlying system, so it won't work on non-POSIX systems. However, it does try to detect the level of POSIX conformance of the underlying system and bind only available APIs.

For a while, luaposix contained support for curses functionality too, but now it has its own lcurses repository again, where it is being maintained separately.

luaposix is released under the MIT license (the same license as Lua itsef). There is no warranty.

Installation

The simplest and best way to install luaposix is with LuaRocks. To install the latest release (recommended):

    luarocks install luaposix

To install current git master (for testing, before submitting a bug report for example):

    luarocks install http://raw.github.com/luaposix/luaposix/master/luaposix-git-1.rockspec

The best way to install without LuaRocks, is to call the bundled build-aux/luke command in a freshly cloned working copy.

Note that you'll be responsible for providing dependencies if you choose not to let LuaRocks handle them for you, though you can find a list of the minimal dependencies in the rockspec file.

If you are repackaging or redistributing luaposix, it is better to start from a release tarball, because the master development branch is branch is unstable, and sometimes breaks subtly, or does not build at all, or provides experimental new APIs that end up being removed prior to the next official release.

Note that there are full logs of complete builds for every commit in Travis, which you can compare with your progress if you get stuck.

Use

The library is split into submodules according to the POSIX header file API declarations, which you can require individually:

    local unistd = require 'posix.unistd'

The authoritative online POSIX reference is published at SUSv3.

Documentation

The latest release of this library is documented in LDoc. Pre-built HTML files are included in the release, and contain links to the appropriate SUSv3 manual pages.

Example code

See the example program tree.lua, along with the many small examples in the generated documentation and BDD specs/*_spec.yaml.

For a complete application, see the GNU Zile.

Bugs reports and code contributions

These libraries are maintained by their users.

Please make bug reports and suggestions as GitHub issues. Pull requests are especially appreciated.

But first, please check that you issue has not already been reported by someone else, and that it is not already fixed by master in preparation for the next release (See Installation section above for how to temporarily install master with LuaRocks).

There is no strict coding style, but please bear in mind the following points when proposing changes:

  1. Follow existing code. There are a lot of useful patterns and avoided traps there.

  2. 8-character indentation using TABs in C sources; 3-character indentation using SPACEs in Lua sources.

  3. Simple strings are easiest to type using single-quote delimiters saving double-quotes for where a string contains apostrophes.

  4. Save horizontal space by only using SPACEs where the parser requires them.

  5. Use vertical space to separate out compound statements to help the coverage reports discover untested lines.

  6. Prefer explicit string function calls over object methods, to mitigate issues with monkey-patching in caller environment.

  7. No non-POSIX APIs; no platform-specific code. When wrapping APIs introduced in POSIX 2001 or later, add an appropriate #if. If your platform isn't quite POSIX, you may find a gnulib module to bridge the gap. If absolutely necessary, use luke feature tests.

  8. Thin wrappers: although some existing code contradicts this, wrap POSIX APIs in the simplest way possible. If necessary, more convenient wrappers can be added in Lua (posix.lua).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].