ffi

This doc is about the Foreign Function Interface (FFI) features of the core.

Besides accessing system, OS, and external libraries via binding code (dynamically in Lisp, statically in Rust), we also expose parts of the core in a C-compatible fashion. In Lisp, we use the SB-ALIEN interface to load (with dlopen) and call foreign symbols. In Rust we mostly use rust-bindgen and the built-in rustc features.

sb-grovel
arrow
blake3
btrfs
alsa
jack
matroska
cuda
evdev
glib
gstreamer
keyutils
rocksdb
rustls
sndfile
ssh2
tree-sitter
ublk
uring
xkb
zstd
jpeg
chromaprint

Libraries

The following binding libraries are provided with supporting code. There is some cross-over between the Lisp and Rust bindings depending on what library features we need and where. Some of the bindings are very minimal or for experimental-use only only.

xkb

These bindings are actually directed at libxkbcommon instead of x11/xkb directly.

  • packages
XKB/TESTS
XKB
  • dependencies
std
  • files
pkg.lisp
constants.lisp
x11.lisp

rocksdb

RocksDB Wiki

  • packages
ROCKSDB
ROCKSDB/TESTS
  • dependencies
std
log
  • files
pkg.lisp
prim.lisp
types.lisp
opts.lisp
env.lisp
sst.lisp
db.lisp
checkpoint.lisp
metadata.lisp
merge.lisp
compaction.lisp
comparator.lisp
slicetransform.lisp
writebatch.lisp
logger.lisp
stats.lisp
vars.lisp
macs.lisp

btrfs

The kernel headers btrfs and btrfs_tree will be wrapped at some point in addition to the userspace library (btrfsutil) documented below.

  • packages
BTRFS
BTRFS/TESTS
  • dependencies
sb-grovel
std
  • files
pkg.lisp
constants.lisp
util.lisp

uring

https://man.archlinux.org/man/io_uring.7.en

  • packages
URING
URING/TESTS
  • dependencies
sb-grovel
std
obj
  • files
pkg.lisp
constants.lisp
util.lisp
macs.lisp
alien.lisp
opcode.lisp
prim.lisp
register.lisp
submit.lisp
sq.lisp
cq.lisp
uring.lisp

zstd

zstd compression bindings: https://github.com/facebook/zstd

  • packages
ZSTD
ZSTD/TESTS
  • dependencies
sb-grovel
std
  • files
pkg.lisp
constants.lisp
simple.lisp
stream.lisp
dict.lisp
util.lisp

tree-sitter

bindings to tree-sitter parser generator and language libraries: https://github.com/tree-sitter/tree-sitter

  • packages
TREE-SITTER/TESTS
TREE-SITTER
  • dependencies
sb-grovel
std
  • files
pkg.lisp
ffi.lisp
lang.lisp
api.lisp
constants.lisp