~les/janet-openbsd

Janet bindings for OpenBSD specific system calls.
Update installation instructions
Bump to version 0.4.0: Implement sendsyslog
Add placeholder tests

clone

read-only
https://git.sr.ht/~les/janet-openbsd
read/write
git@git.sr.ht:~les/janet-openbsd

You can also use your local clone with git send-email.

#Janet OpenBSD syscalls wrapper

A Janet wrapper module around OpenBSD specific syscalls.

#Status

Implemented:

Future work:

#Install (from jpm)

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

#Usage (from Janet)

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)
[]

#Basic Example

(import openbsd)

(if (= os/which :openbsd)
  (do
    (openbsd/pledge [:stdio :rpath] nil)
    (openbsd/unveil "/usr/src" "rc")))

#Contribute

Yes.

#License

This package is released under the MIT License. See LICENSE for more information.