changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / readme.org

changeset 662: a53be64410c5
parent: b499d4bcfc39
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 21 Sep 2024 18:18:14 -0400
permissions: -rwxr-xr-x
description: removed skel project env/def, added to BIND
1 #+title: core
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]]
8 
9 This repository contains the monolothic core of [[comp:][The Compiler Company]].
10 
11 * Overview
12 The CC core is categorized into language-specific modules. Our
13 languages at time of writing are Common Lisp, Rust, and Emacs Lisp.
14 
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
20 binaries.
21 
22 * Bootstrap
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
25 supported.
26 
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.
30 
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]].
34 
35 #+NAME: Dependencies
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 |
55 
56 * Build
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
60 customizations.
61 
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.
65 ** From Source
66 *** Lisp
67 The Lisp Core can be found under the =lisp= directory. It is the
68 largest system, most actively developed, and is intended to cover the
69 complete surface of the user-facing APIs contained in the core.
70 
71 The core is self-hosted in the sense that it is intended to be built
72 from one of its own programs - the =skel= project compiler. You may
73 also load any part of the core individually as long as you have [[https://www.sbcl.org/][SBCL]]
74 and [[https://www.quicklisp.org/beta/][Quicklisp]] installed.
75 *** Rust
76 Today, the Rust components of the core are quite small and
77 isolated. We like Rust right now for the reasonable memory safety
78 guarantees, as an interface to (W)GPU, WASM, LLVM, etc, and because it
79 has an industry-sponsored ecosystem (guaranteed future).
80 
81 Our Rust code is far less concerned with being completely from
82 scratch - dependencies are imported freely and at will - adapting to
83 whatever FOTM is hot right now.
84 
85 A workspace is configured such that you can build all components with
86 the following command (~NOTE~ - takes a long time):
87 #+begin_src shell :exports both :results output
88  cd rust && cargo build
89 #+end_src
90 
91 *** Emacs
92 The core contains a collection of Emacs Lisp libraries under =emacs=
93 which may be installed for the current user using the corresponding
94 Makefile.