Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/euantorano/pledge.nim
A wrapper around OpenBSD's pledge(2) systemcall for Nim.
https://github.com/euantorano/pledge.nim
nim openbsd openbsd-pledge pledge
Last synced: 1 day ago
JSON representation
A wrapper around OpenBSD's pledge(2) systemcall for Nim.
- Host: GitHub
- URL: https://github.com/euantorano/pledge.nim
- Owner: euantorano
- License: bsd-3-clause
- Created: 2016-04-12T10:52:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T06:08:56.000Z (over 1 year ago)
- Last Synced: 2024-02-14T03:28:42.819Z (9 months ago)
- Topics: nim, openbsd, openbsd-pledge, pledge
- Language: Nim
- Homepage:
- Size: 44.9 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pledge - pledge.nim
README
# pledge.nim [![builds.sr.ht status](https://builds.sr.ht/~euantorano.svg?search=pledge.nim)](https://builds.sr.ht/~euantorano?search=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:
```
# Dependenciesrequires "pledge >= 2.0.0"
```## Usage
```nim
import pledgepledge(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")
```