changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / core/ffi.org

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