changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / core/lib/ffi.org

changeset 48: 9f2e9e647333
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 07 Sep 2024 22:34:47 -0400
permissions: -rw-r--r--
description: core documentation and stats
1 #+title: ffi
2 #+author: Richard Westhaver
3 #+setupfile: ../../clean.theme
4 #+OPTIONS: num:nil
5 This doc is about the [[https://en.wikipedia.org/wiki/Foreign_function_interface][Foreign Function Interface]] (FFI) features of the
6 =core=.
7 
8 Besides accessing system, OS, and external libraries via binding code
9 (dynamically in Lisp, statically in Rust), we also expose parts of the
10 core in a C-compatible fashion. In Lisp, we use the SB-ALIEN interface
11 to load (with dlopen) and call foreign symbols. In Rust we mostly use
12 rust-bindgen and the built-in rustc features.
13 
14 * Libraries
15 :PROPERTIES:
16 :ID: 1eb797dc-d617-46cc-89e8-7b6103e526d2
17 :END:
18 The following binding libraries are provided with supporting
19 code. There is some cross-over between the Lisp and Rust bindings
20 depending on what library features we need and where. Some of the
21 bindings are very minimal or for experimental-use only only.
22 ** xkb
23 :PROPERTIES:
24 :ID: 79b3a686-efe9-411e-9d1e-358113622949
25 :END:
26 These bindings are actually directed at libxkbcommon instead of
27 x11/xkb directly.
28 *** xkbcommon
29 :PROPERTIES:
30 :ID: 9b9be592-1314-4926-940a-908ff4844e29
31 :END:
32 https://xkbcommon.org/doc/current/md_doc_2quick-guide.html
33 ** rocksdb
34 :PROPERTIES:
35 :ID: 5a1fd665-b72a-4d62-af4c-4967825f69c6
36 :END:
37 [[https://github.com/facebook/rocksdb/wiki][RocksDB Wiki]]
38 ** btrfs
39 :PROPERTIES:
40 :ID: 6b3dc423-0e1c-458d-9f8e-bf7456f9a048
41 :END:
42 The kernel headers btrfs and btrfs_tree will be wrapped at some point
43 in addition to the userspace library (btrfsutil) documented below.
44 *** btrfsutil
45 :PROPERTIES:
46 :ID: 7296995d-2b67-45ec-94d9-8fe23126a602
47 :END:
48 https://github.com/kdave/btrfs-progs
49 ** uring
50 :PROPERTIES:
51 :ID: c0750228-7ba8-445a-8790-ca0310cf0a7d
52 :END:
53 https://man.archlinux.org/man/io_uring.7.en
54 ** zstd
55 :PROPERTIES:
56 :ID: 6dbfed55-0d07-4090-bc3b-ea9317d9bfe5
57 :END:
58 zstd compression bindings: https://github.com/facebook/zstd
59 ** tree-sitter
60 :PROPERTIES:
61 :ID: 8527c382-ae65-4ad9-8f70-9ff5c6b152f0
62 :END:
63 bindings to tree-sitter parser generator and language libraries: https://github.com/tree-sitter/tree-sitter
64 ** COMMENT blake3
65 :PROPERTIES:
66 :ID: a1807b79-9811-49f0-9524-cbf5e88c1a66
67 :END:
68 temporary package for CL implementation of Blake3 SHA. Wraps C
69 implementation (libblake3).
70 ** COMMENT alpm
71 :PROPERTIES:
72 :ID: cdd1682c-39b0-450e-a979-a5637cd15f43
73 :END:
74 https://man.archlinux.org/man/core/pacman/libalpm.3.en
75 https://github.com/archlinux/alpm.rs/tree/382af70cdbff8e1f65c0bf8df79693786f44429c/alpm/examples
76 
77 ** COMMENT bqn
78 :PROPERTIES:
79 :ID: 5014f979-5b3a-4dfc-89e3-5a5a23462a29
80 :END:
81 These bindings are for libcbqn which can be build from CBQN:
82 https://github.com/dzaima/CBQN
83 ** COMMENT k
84 :PROPERTIES:
85 :ID: 47a60640-e387-4ac7-ab45-4f7a763e9611
86 :END:
87 https://codeberg.org/ngn/k
88 bindings for ngn/k (libk).
89 ** COMMENT nuklear
90 :PROPERTIES:
91 :ID: e1e942b2-ebe0-48e9-bdd3-f4e27b7fed7c
92 :END:
93 ** COMMENT ssh2
94 :PROPERTIES:
95 :ID: 3c9e02d8-2c59-4ef5-8232-8422fd9e8ed3
96 :END: