# HG changeset patch # User ellis # Date 1702435816 18000 # Node ID 31db7a83d2c62c5b59770f839c1c2e86a354a5e9 # Parent d0a90a87b8241bf3ba9c751dd7f9347bff8748be ffi diff -r d0a90a87b824 -r 31db7a83d2c6 core/api/readme.org --- a/core/api/readme.org Sat Dec 09 20:50:45 2023 -0500 +++ b/core/api/readme.org Tue Dec 12 21:50:16 2023 -0500 @@ -1,3 +1,6 @@ {{{header(Core API Docs,Richard Westhaver,ellis@rwest.io)}}} #+OPTIONS: ^:nil toc:nil num:nil html-postamble:nil #+EXPORT_FILE_NAME: index + +This documentation is automatically generated based on the most recent +official core build. diff -r d0a90a87b824 -r 31db7a83d2c6 core/app/skel.org --- a/core/app/skel.org Sat Dec 09 20:50:45 2023 -0500 +++ b/core/app/skel.org Tue Dec 12 21:50:16 2023 -0500 @@ -72,6 +72,27 @@ :imports ("lisp/lisp.sk" "rust/rust.sk") #+end_src +Another example with rules and components: + +#+begin_src skel +;;; skelfile @ 2023-10-08.02:37:25 -*- mode: skel; -*- +:name skel +:author "ellis" +:version "0.1.0" +:description "a hacker's project compiler" +:license "MPL" +:vc :hg +:tags ("lisp") +:rules ((build () (print (asdf:make :skel/cli))) + (clean () #$rm -rf */*.fasl$#)) +:docs ((:org "readme")) +:components +((:elisp "sk")) +:stash "~/dev/comp/stash" +:shed "~/dev/comp/shed" +:snippets +((autogen #$sbcl --eval '(ql:quickload :app/cli/skel)' --eval '(asdf:make :app/cli/skel)'$#)) +#+end_src ** version control =skel= integrates closely with our Version Control System (VCS) which is built on [[https://www.mercurial-scm.org/][Mercurial]], but we also interact with and host many [[https://git-scm.com/][Git]] diff -r d0a90a87b824 -r 31db7a83d2c6 core/ffi.org --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/ffi.org Tue Dec 12 21:50:16 2023 -0500 @@ -0,0 +1,46 @@ +{{{header(core/ffi,Richard Westhaver,ellis@rwest.io)}}} + +This doc is about the [[https://en.wikipedia.org/wiki/Foreign_function_interface][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. + +* 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. +*** xkbcommon +https://xkbcommon.org/doc/current/md_doc_2quick-guide.html +** rocksdb +[[https://github.com/facebook/rocksdb/wiki][RocksDB Wiki]] +** btrfs +The kernel headers btrfs and btrfs_tree will be wrapped at some point +in addition to the userspace library (btrfsutil) documented below. +*** btrfsutil +https://github.com/kdave/btrfs-progs +** uring +https://man.archlinux.org/man/io_uring.7.en +** alpm +https://man.archlinux.org/man/core/pacman/libalpm.3.en +https://github.com/archlinux/alpm.rs/tree/382af70cdbff8e1f65c0bf8df79693786f44429c/alpm/examples +** zstd +zstd compression bindings: https://github.com/facebook/zstd +** tree-sitter +bindings to tree-sitter parser generator and language libraries: https://github.com/tree-sitter/tree-sitter +** blake3 +temporary package for CL implementation of Blake3 SHA. Wraps C +implementation (libblake3). +** bqn +These bindings are for libcbqn which can be build from CBQN: +https://github.com/dzaima/CBQN +** k +https://codeberg.org/ngn/k +bindings for ngn/k (libk). diff -r d0a90a87b824 -r 31db7a83d2c6 core/readme.org --- a/core/readme.org Sat Dec 09 20:50:45 2023 -0500 +++ b/core/readme.org Tue Dec 12 21:50:16 2023 -0500 @@ -1,10 +1,35 @@ {{{header(docs/core,Richard Westhaver,ellis@rwest.io)}}} #+EXPORT_FILE_NAME: index +#+begin_src shell :dir ~/dev/comp/core/ :results pp :exports results + tokei -t=rust,lisp +#+end_src + +#+RESULTS: +#+begin_example +=============================================================================== + Language Files Lines Code Comments Blanks +=============================================================================== + Lisp 114 13419 10455 1234 1730 +------------------------------------------------------------------------------- + Rust 142 12407 10732 443 1232 + |- Markdown 101 804 0 709 95 + (Total) 13211 10732 1152 1327 +=============================================================================== + Total 256 25826 21187 1677 2962 +=============================================================================== +#+end_example + - [[file:notes.org][Notes]] :: Internal Notes -- [[file:app][App Docs]] :: High-level App Documentation +* [[file:app][APP]] +App Docs + +* [[file:lib][LIB]] +Library Docs -- [[file:lib][Lib Docs]] :: High-level Lib Documentation +* [[file:ffi.org][FFI]] +FFI Docs -- [[file:api][API Docs]] :: API Reference +* [[file:api][API]] +API Reference diff -r d0a90a87b824 -r 31db7a83d2c6 infra/notes.org --- a/infra/notes.org Sat Dec 09 20:50:45 2023 -0500 +++ b/infra/notes.org Tue Dec 12 21:50:16 2023 -0500 @@ -0,0 +1,1 @@ +{{{header(infra/notes,Richard Westhaver,ellis@rwest.io)}}} diff -r d0a90a87b824 -r 31db7a83d2c6 infra/readme.org --- a/infra/readme.org Sat Dec 09 20:50:45 2023 -0500 +++ b/infra/readme.org Tue Dec 12 21:50:16 2023 -0500 @@ -1,4 +1,22 @@ {{{header(docs/infra,Richard Westhaver,ellis@rwest.io)}}} #+EXPORT_FILE_NAME: index +#+begin_src shell :dir ~/dev/comp/infra :results pp :exports results + tokei -t=css,lisp,makefile,shell,js +#+end_src + +#+RESULTS: +#+begin_example +=============================================================================== + Language Files Lines Code Comments Blanks +=============================================================================== + CSS 2 227 190 9 28 + Lisp 2 152 109 11 32 + Makefile 1 156 110 20 26 + Shell 31 1185 866 198 121 +=============================================================================== + Total 36 1720 1275 238 207 +=============================================================================== +#+end_example + - [[file:notes.org][Notes]] :: Internal Notes. diff -r d0a90a87b824 -r 31db7a83d2c6 infra/scripts.org --- a/infra/scripts.org Sat Dec 09 20:50:45 2023 -0500 +++ b/infra/scripts.org Tue Dec 12 21:50:16 2023 -0500 @@ -0,0 +1,31 @@ +{{{header(infra/scripts,Richard Westhaver,ellis@rwest.io)}}} + +#+begin_src shell :dir ~/dev/comp/infra/scripts :results list replace :output results + ls +#+end_src + +#+RESULTS: +- arch-upgrade.sh +- autogen.lisp +- aws-set-env.sh +- build-emacs.sh +- bundle-dir.sh +- check.lisp +- eval.sh +- get-cargo-tools.sh +- get-cl.sh +- get-code.sh +- get-emacs.sh +- get-linux.sh +- get-lust.sh +- get-rocksdb.sh +- get-rust.sh +- get-sbcl.sh +- git-vendor-pull.sh +- init.sh +- print-colors.sh +- record-gif.sh +- sbcl-save-core.sh +- sc.sh +- ts-install-langs.sh +- wg-gen-keys.sh