2 #+description: The Compiler Company Core
3 #+author: Richard Westhaver
4 #+email: richard.westhaver@gmail.com
5 #+setupfile: https://cdn.compiler.company/org/clean.theme
6 #+property: header-args :eval no-export
7 - [[https://compiler.company/docs/core][Docs]] 8 - [[https://compiler.company/docs/core/install.html][Install]] :: Install Guide
9 - [[https://compiler.company/docs/core/tests.html][Tests]] :: Testing Guide
10 - [[https://compiler.company/docs/core/stats.html][Stats]] :: Project Statistics
13 This repository contains the monolothic core of
[[comp:][The Compiler Company]].
15 To bootstrap the core you will need recent versions of
[[https://www.rust-lang.org/][Rust]],
[[http://www.sbcl.org/][SBCL]], and
16 a C compiler (clang or gcc). Only Unix systems are explicitly
19 Many parts of the core depend on additional libraries which may or may
20 not be provided by your system's package manager. See the dependency
21 matrix below for details.
23 In any case, it is always preferred to make use of the
[[https://vc.compiler.company/comp/infra][infra]] project
24 to reliably provision the host either from source or pre-built
25 platform-specific
[[https://packy.compiler.company/dist][binary distributions]].
27 #+NAME: Optional Dependencies
28 | dependency | dependents | src | 29 |-------------+------------------------+-----------------------------------------------| 30 | Blake3 | ffi/blake3 | https://vc.compiler.company/packy/blake3 | 31 | Tree-sitter | ffi/tree-sitter | https://vc.compiler.company/packy/tree-sitter | 32 | Uring | ffi/uring | https://vc.compiler.company/packy/uring | 33 | Btrfs | ffi/btrfs | https://vc.compiler.company/packy/btrfs | 34 | Ublksrv | ffi/ublk | https://vc.compiler.company/packy/ublksrv | 35 | OpenSSL | lib/net | [[https://vc.compiler.company/packy/openssl]] | 36 | RocksDB | ffi/rocksdb | https://vc.compiler.company/packy/rocksdb | 37 | Git | lib/vc/git | https://vc.compiler.company/packy/git | 38 | Hg | lib/vc/hg | https://vc.compiler.company/packy/hg | 39 | Zstd | ffi/zstd | https://vc.compiler.company/packy/zstd | 40 | Qemu | lib/box | https://vc.compiler.company/packy/qemu | 41 | Podman | lib/pod | https://vc.compiler.company/packy/podman | 42 | Emacs | emacs | https://vc.compiler.company/packy/emacs | 43 | StumpWM | lib/gui/wm/x11/stumpwm | https://vc.compiler.company/packy/stumpwm | 44 | Readline | ffi/readline | [[https://vc.compiler.company/packy/readline]] | 45 | Keyutils | ffi/keyutils | [[https://vc.compiler.company/packy/libkeyutils]] | 46 | Mpd | lib/aud/mpd | https://vc.compiler.company/packy/mpd | 49 The Core consists of two major system: the
*lisp* system and the
50 *rust* system. There is also an auxiliary
*emacs* system containing a
51 complete Emacs IDE configuration which serves as the base for user
54 Building the core will produce its output to the
=.stash= directory by
55 default. You can then test, run, and install the resulting files or
56 package them up to be shipped elsewhere.
58 The core produces a collection of native program binaries, compiled
59 lisp modules in FASL format, as well as web distributions containing
60 the usual suspects (html, css, js) as well as wasm modules.
64 The Lisp Core can be found under the
=lisp= directory. It is the
65 largest system, most actively developed, and is intended to cover the
66 complete surface of the user-facing APIs contained in the core.
68 Starting from a standard Common Lisp environment with at least
69 [[https://www.quicklisp.org/beta/][Quicklisp]] installed, you can execute
=./x.lisp build skel= to build
70 the project compiler and
=./x.lisp run skel= to run it. This tool is a
71 convenience for building and testing different parts of the core from
72 a minimal dependency set.
75 #+begin_src shell :exports both :results output 76 # bootstrap the core build tool
82 This is SBCL 2.4.7:76bbecb68, an implementation of ANSI Common Lisp.
83 More information about SBCL is available at <http://www.sbcl.org/>.
85 SBCL is free software, provided as is, with absolutely no warranty.
86 It is mostly in the public domain; some portions are provided under
87 BSD-style licenses. See the CREDITS and COPYING files in the
88 distribution for more information.
94 x.lisp --- core build tool
107 To test the lisp standard library:
108 #+begin_src shell :results output :exports both 115 This is SBCL 2.4.7:dc890089a, an implementation of ANSI Common Lisp.
116 More information about SBCL is available at <http://www.sbcl.org/>.
118 SBCL is free software, provided as is, with absolutely no warranty.
119 It is mostly in the public domain; some portions are provided under
120 BSD-style licenses. See the CREDITS and COPYING files in the
121 distribution for more information.
135 ; Loading "std/tests"
157 To save the prelude to
=.stash/prelude.core=:
158 #+begin_src shell :results output :noeval t 163 And to install binaries (defaults to
=/usr/local/bin/=):
164 #+begin_src shell :results none :noeval t 170 The Core Rust system can be found under the
=rust= directory.
172 A workspace is configured such that you can build all components with
173 the following command (
~NOTE~ - takes a long time):
174 #+begin_src shell :exports both :results output 175 cd rust && cargo build --release
179 The core contains a collection of Emacs Lisp libraries under
=emacs= 180 which may be installed for the current user using the corresponding
183 ** TODO Bootstrap from packy :experimental: 184 The following can (maybe someday) be used to bootstrap the core without a full
186 #+begin_src shell :results output 187 curl --proto '=https' \
190 https://packy.compiler.company/dist/x86_64-unknown-linux-gnu/bin/sk \
198 This is SBCL 2.4.5, an implementation of ANSI Common Lisp.
199 More information about SBCL is available at <http://www.sbcl.org/>.
201 SBCL is free software, provided as is, with absolutely no warranty.
202 It is mostly in the public domain; some portions are provided under
203 BSD-style licenses. See the CREDITS and COPYING files in the
204 distribution for more information.
210 saving skel to: /home/ellis/comp/core/.stash/skel
216 [undoing binding stack and other enclosing state... done]
217 [performing final GC... done]
218 [saving current Lisp image into /home/ellis/comp/core/.stash/skel:
219 writing 15984 bytes from the static space at 0x50100000
220 writing 339476480 bytes from the dynamic space at 0x1000000000
221 writing 12498752 bytes from the read-only space at 0x74232dc00000
222 writing 0 bytes from the text space at (nil)
230 This section lists all program binaries provided by the core.
232 #+begin_src shell :results output :exports both 238 skel v0.1.1:ce91ffc6cc7a+ --- A hacker's project compiler.
240 usage: skel [global] <command> [<arg>]
243 -h/--help* : print this message
244 -v/--version* : print version
245 -l/--level* : set log level (warn,info,debug,trace)
246 -c/--config* : set a custom skel user config
247 -i/--input* : input source
248 -o/--output* : output target
251 init : initialize a skelfile in the current directory
252 -n/--name : project name
253 new : make a new skel project
254 -n/--name : project name
255 describe : describe a skelfile
256 show : show project slots
257 -f/--file : path to skelfile
258 -u/--user : print user configuration
259 -s/--system : print system configuration
261 -r/--root : repository path
262 id : print the project id
263 inspect : inspect the project skelfile
264 -f/--file : path to skelfile
265 make : build project targets
266 -t/--target : target to build
267 run : run a script or command
268 compile : compile source code
269 build : build programs and libraries
270 dist : distribute build artifacts
271 install : install stuff
273 unpack : unpack stuff
274 bundle : bundle source code
275 unbundle : unbundle source code
276 clean : clean up the project
278 bench : run benchmark
279 status : print the vc status
280 push : push the current project upstream
281 pull : pull the current project from remote
282 clone : clone a remote project
283 commit : commit changes to the project vc
284 edit : edit a project file in emacs.
285 shell : open the sk-shell interpreter
289 #+begin_src shell :results output :exports both 295 organ v0.0.1 --- org-mode toolbox
297 usage: organ [global] <command> [<arg>]
300 -l/--level* : set the log level
301 -h/--help* : print help
302 -v/--version* : print version
305 inspect : inspect an org file
306 show : display local org info
307 describe : describe local org info
312 #+begin_src shell :results output :exports both 318 packy v0.1.0 --- Universal Package Manager
320 usage: packy [global] <command> [<arg>]
323 -l/--level* : set the log level
324 -h/--help* : print help
325 -v/--version* : print version
336 #+begin_src shell :results output :exports both 343 #+begin_src shell :results output :exports both 349 homer v0.1.0 --- user home manager
351 usage: homer [global] <command> [<arg>]
354 -l/--level* : set the log level
355 -h/--help* : print help
356 -v/--version* : print version
357 -f/--force* : use force
367 ** COMMENT alik :rust: 368 #+begin_src shell :results output :exports both 374 ** COMMENT krypt :lisp: 375 #+begin_src shell :results output :exports both 383 Usage: krypt [OPTIONS] [COMMAND]
386 check check service providers and config
388 search Query the Krypt
389 help Print this message or the help of the given subcommand(s)
392 -c, --cfg <CFG> Set the default config file [env: KRYPT_CONFIG_FILE=]
393 -u, --user <USER> Set a user for this command [env: USER=ellis]
394 -l, --level... Set log level
395 -h, --help Print help
396 -V, --version Print version
400 #+begin_src shell :results output :exports both 408 Usage: mailman [OPTIONS] [COMMAND]
412 search Search for items
413 import Import an account
414 export Export an account
415 help Print this message or the help of the given subcommand(s)
418 -c, --cfg <CFG> Set the default config file [env: MAILMAN_CONFIG_FILE=]
419 -u, --user <USER> Set a user for this command [env: USER=ellis]
420 -l, --level... Set log level
421 -h, --help Print help
422 -V, --version Print version