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][Documentation]] 9 This repository contains the monolothic core of
[[comp:][The Compiler Company]].
12 The CC core is categorized into language-specific modules. Our
13 languages at time of writing are Common Lisp, Rust, and Emacs Lisp.
15 The top-level modules are contained in the directories
=lisp=,
=rust=,
16 and
=emacs= respectively. At the root directory you will also find a
17 =skelfile= and a
=sk= file for each module. These files contain
18 project definitions which are used by our
=skel= program to perform a
19 variety of actions on the core such as running tests and building
23 To bootstrap the core you will need recent versions of
[[https://www.rust-lang.org/][Rust]],
[[http://www.sbcl.org/][SBCL]], and
24 a C compiler (clang or gcc). Only Unix systems are explicitly
27 Many parts of the core depend on additional libraries which may or may
28 not be provided by your system's package manager. See the dependency
29 matrix below for details.
31 In any case, it is always preferred to make use of the
[[https://vc.compiler.company/comp/infra][infra]] project
32 to reliably provision the host either from source or pre-built
33 platform-specific
[[https://packy.compiler.company/dist][binary distributions]].
36 | dependency | required by | src | 37 |-------------+------------------------+-----------------------------------------------| 38 | Blake3 | ffi/blake3 | https://vc.compiler.company/packy/blake3 | 39 | Tree-sitter | ffi/tree-sitter | https://vc.compiler.company/packy/tree-sitter | 40 | Uring | ffi/uring | https://vc.compiler.company/packy/uring | 41 | Btrfs | ffi/btrfs | https://vc.compiler.company/packy/btrfs | 42 | Ublksrv | ffi/ublk | https://vc.compiler.company/packy/ublksrv | 43 | OpenSSL | lib/net | [[https://vc.compiler.company/packy/openssl]] | 44 | RocksDB | ffi/rocksdb | https://vc.compiler.company/packy/rocksdb | 45 | Git | lib/vc/git | https://vc.compiler.company/packy/git | 46 | Hg | lib/vc/hg | https://vc.compiler.company/packy/hg | 47 | Zstd | ffi/zstd | https://vc.compiler.company/packy/zstd | 48 | Qemu | lib/box | https://vc.compiler.company/packy/qemu | 49 | Podman | lib/pod | https://vc.compiler.company/packy/podman | 50 | Emacs | emacs | https://vc.compiler.company/packy/emacs | 51 | StumpWM | lib/gui/wm/x11/stumpwm | https://vc.compiler.company/packy/stumpwm | 52 | Readline | ffi/readline | [[https://vc.compiler.company/packy/readline]] | 53 | Keyutils | ffi/keyutils | [[https://vc.compiler.company/packy/libkeyutils]] | 54 | Mpd | lib/aud/mpd | https://vc.compiler.company/packy/mpd | 57 The Core consists of two major system: the
*lisp* system and the
58 *rust* system. There is also an auxiliary
*emacs* system containing a
59 complete Emacs IDE configuration which serves as the base for user
62 Building the core will produce its output to the
=.stash= directory by
63 default. You can then test, run, and install the resulting files or
64 package them up to be shipped elsewhere.
66 The core produces a collection of native program binaries, compiled
67 lisp modules in FASL format, as well as web distributions containing
68 the usual suspects (html, css, js) as well as wasm modules.
72 The Lisp Core can be found under the
=lisp= directory. It is the
73 largest system, most actively developed, and is intended to cover the
74 complete surface of the user-facing APIs contained in the core.
76 Starting from a standard Common Lisp environment with at least
77 [[https://www.quicklisp.org/beta/][Quicklisp]] installed, you can execute
=./x.lisp build skel= to build
78 the project compiler and
=./x.lisp run skel= to run it. This tool is a
79 convenience for building and testing different parts of the core from
80 a minimal dependency set.
83 #+begin_src shell :exports both :results output 84 # bootstrap the core build tool
90 This is SBCL 2.4.7:76bbecb68, an implementation of ANSI Common Lisp.
91 More information about SBCL is available at <http://www.sbcl.org/>.
93 SBCL is free software, provided as is, with absolutely no warranty.
94 It is mostly in the public domain; some portions are provided under
95 BSD-style licenses. See the CREDITS and COPYING files in the
96 distribution for more information.
102 x.lisp --- core build tool
115 To test the lisp standard library:
116 #+begin_src shell :results output :exports both 123 This is SBCL 2.4.7:dc890089a, an implementation of ANSI Common Lisp.
124 More information about SBCL is available at <http://www.sbcl.org/>.
126 SBCL is free software, provided as is, with absolutely no warranty.
127 It is mostly in the public domain; some portions are provided under
128 BSD-style licenses. See the CREDITS and COPYING files in the
129 distribution for more information.
143 ; Loading "std/tests"
165 To save the prelude to
=.stash/prelude.core=:
166 #+begin_src shell :results output :noeval t 171 And to install binaries (defaults to
=/usr/local/bin/=):
172 #+begin_src shell :results none :noeval t 178 The Core Rust system can be found under the
=rust= directory.
180 A workspace is configured such that you can build all components with
181 the following command (
~NOTE~ - takes a long time):
182 #+begin_src shell :exports both :results output 183 cd rust && cargo build --release
187 The core contains a collection of Emacs Lisp libraries under
=emacs= 188 which may be installed for the current user using the corresponding