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