changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / core/ffi.org

changeset 31: 0b69e63c9374
parent: a0017112db77
child: bc53e27c0163
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 16 Jun 2024 01:14:25 -0400
permissions: -rw-r--r--
description: clean
1 #+title: ffi
2 #+author: Richard Westhaver
3 #+setupfile: ../../clean.theme
4 #+OPTIONS: num:nil
5 #+INFOJS_OPT: toc:nil view:content
6 
7 This doc is about the [[https://en.wikipedia.org/wiki/Foreign_function_interface][Foreign Function Interface]] (FFI) features of the
8 =core=.
9 
10 Besides accessing system, OS, and external libraries via binding code
11 (dynamically in Lisp, statically in Rust), we also expose parts of the
12 core in a C-compatible fashion. In Lisp, we use the SB-ALIEN interface
13 to load (with dlopen) and call foreign symbols. In Rust we mostly use
14 rust-bindgen and the built-in rustc features.
15 
16 * Libraries
17 The following binding libraries are provided with supporting
18 code. There is some cross-over between the Lisp and Rust bindings
19 depending on what library features we need and where. Some of the
20 bindings are very minimal or for experimental-use only only.
21 ** xkb
22 These bindings are actually directed at libxkbcommon instead of
23 x11/xkb directly.
24 *** xkbcommon
25 https://xkbcommon.org/doc/current/md_doc_2quick-guide.html
26 ** rocksdb
27 [[https://github.com/facebook/rocksdb/wiki][RocksDB Wiki]]
28 ** btrfs
29 The kernel headers btrfs and btrfs_tree will be wrapped at some point
30 in addition to the userspace library (btrfsutil) documented below.
31 *** btrfsutil
32 https://github.com/kdave/btrfs-progs
33 ** uring
34 https://man.archlinux.org/man/io_uring.7.en
35 ** zstd
36 zstd compression bindings: https://github.com/facebook/zstd
37 ** tree-sitter
38 bindings to tree-sitter parser generator and language libraries: https://github.com/tree-sitter/tree-sitter
39 ** COMMENT blake3
40 temporary package for CL implementation of Blake3 SHA. Wraps C
41 implementation (libblake3).
42 ** COMMENT alpm
43 https://man.archlinux.org/man/core/pacman/libalpm.3.en
44 https://github.com/archlinux/alpm.rs/tree/382af70cdbff8e1f65c0bf8df79693786f44429c/alpm/examples
45 
46 ** COMMENT bqn
47 These bindings are for libcbqn which can be build from CBQN:
48 https://github.com/dzaima/CBQN
49 ** COMMENT k
50 https://codeberg.org/ngn/k
51 bindings for ngn/k (libk).
52 ** COMMENT nuklear
53 ** COMMENT ssh2