pledge

OpenBSDs pledge(2) for Nim.


Need help? Read Nimble

pledge.nim builds.sr.ht status

A wrapper around OpenBSD's pledge(2) system call for Nim.

Includes support for OpenBSD's unveil(2) system call.

Installation

pledge can be installed using Nimble:

nimble install pledge

Or add the following to your .nimble file:

# Dependencies

requires "pledge >= 2.0.0"

Usage

import pledge

pledge(Promises.Stdio)

# As we haven't used pledge to ask to access files, the below will cause the program to be terminated with a SIGABRT.
let f = open("/etc/rc.conf")

Author: euantorano

Latest versions: 1.1.0 2.0.0 2.0.1

Licence: BSD 3-Clause

Project website

Docs