Skip to content

Janet bindings for OpenBSD specific system calls.

License

Notifications You must be signed in to change notification settings

lescx/janet-openbsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Janet bindings for OpenBSD specific system calls.

Resources

License

Stars

Watchers

Forks

Packages

No packages published