pledge
A wrapper around OpenBSD's pledge(2) systemcall for Nim.
Summary
| Latest Version | 2.0.1 |
|---|---|
| License | BSD3 |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-08-08 05:32 |
Tags
Authors
- Euan T
Installation
nimble install pledge
choosenim install pledge
git clone https://github.com/euantorano/pledge.nim
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| pledge | ✓ | ✓ | ✓ | - | ✓ | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.0.0 | No |
Source
| Repository | https://github.com/euantorano/pledge.nim |
|---|---|
| Homepage | https://github.com/euantorano/pledge.nim |
| Registry Source | nimble_official |
README
pledge.nim 
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")