A Janet wrapper module around OpenBSD specific syscalls.
Implemented:
Future work:
kbind(2)
pinsyscalls(2)
- and more…
jpm is not in the ports tree yet. If you haven't installed jpm yet, follow the bootstrap installation instructions in the link provided.
Afterwards, install the package via jpm
:
$ [doas|sudo] jpm install openbsd
To update the package to the newest version:
$ [doas|sudo] jpm update-installed
If you develop your application for more systems then just OpenBSD, wrap the (openbsd/)
functions in (= os/which :openbsd)
.
To read the documentation of a particular function:
$ janet
repl:1:> (import openbsd)
@{_ @{:value <cycle 0>} openbsd/pledge @{:private true}}
repl:2:> (doc openbsd/pledge)
[…]
(import openbsd)
(if (= os/which :openbsd)
(do
(openbsd/pledge [:stdio :rpath] nil)
(openbsd/unveil "/usr/src" "rc")))
This package is released under the MIT License. See LICENSE for more information.