changelog shortlog graph tags branches changeset files file revisions raw help

Mercurial > core / annotate readme.org

changeset 667: bb8aa1eda12b
parent: b499d4bcfc39
author: Richard Westhaver <ellis@rwest.io>
date: Mon, 23 Sep 2024 17:03:54 -0400
permissions: -rwxr-xr-x
description: graph, css vars, corfu-terminal fix
287
609931bd65ba organ updates, readme.org
Richard Westhaver <ellis@rwest.io>
parents: 187
diff changeset
1
 #+title: core
609931bd65ba organ updates, readme.org
Richard Westhaver <ellis@rwest.io>
parents: 187
diff changeset
2
 #+description: The Compiler Company Core
406
71baf0d4768d skel work
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
3
 #+author: Richard Westhaver
71baf0d4768d skel work
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
4
 #+email: richard.westhaver@gmail.com
444
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
5
 #+setupfile: https://cdn.compiler.company/org/clean.theme
604
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
6
 #+property: header-args :eval no-export
637
b88bf15f60d0 parquet tweaks, import ox-man
Richard Westhaver <ellis@rwest.io>
parents: 604
diff changeset
7
 - [[https://compiler.company/docs/core][Documentation]]
473
dee36ea63090 skelfile work
Richard Westhaver <ellis@rwest.io>
parents: 472
diff changeset
8
 
604
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
9
 This repository contains the monolothic core of [[comp:][The Compiler Company]].
444
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
10
 
643
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
11
 * Overview
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
12
 The CC core is categorized into language-specific modules. Our
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
13
 languages at time of writing are Common Lisp, Rust, and Emacs Lisp.
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
14
 
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
15
 The top-level modules are contained in the directories =lisp=, =rust=,
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
16
 and =emacs= respectively. At the root directory you will also find a
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
17
 =skelfile= and a =sk= file for each module. These files contain
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
18
 project definitions which are used by our =skel= program to perform a
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
19
 variety of actions on the core such as running tests and building
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
20
 binaries.
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
21
 
f901de70a80e opt fixes and test updates
Richard Westhaver <ellis@rwest.io>
parents: 637
diff changeset
22
 * Bootstrap
444
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
23
 To bootstrap the core you will need recent versions of [[https://www.rust-lang.org/][Rust]], [[http://www.sbcl.org/][SBCL]], and
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
24
 a C compiler (clang or gcc). Only Unix systems are explicitly
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
25
 supported.
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
26
 
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
27
 Many parts of the core depend on additional libraries which may or may
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
28
 not be provided by your system's package manager. See the dependency
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
29
 matrix below for details.
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
30
 
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
31
 In any case, it is always preferred to make use of the [[https://vc.compiler.company/comp/infra][infra]] project
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
32
 to reliably provision the host either from source or pre-built
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
33
 platform-specific [[https://packy.compiler.company/dist][binary distributions]].
22
063d92dddd8f readme update
ellis <ellis@rwest.io>
parents: 21
diff changeset
34
 
637
b88bf15f60d0 parquet tweaks, import ox-man
Richard Westhaver <ellis@rwest.io>
parents: 604
diff changeset
35
 #+NAME: Dependencies
b88bf15f60d0 parquet tweaks, import ox-man
Richard Westhaver <ellis@rwest.io>
parents: 604
diff changeset
36
 | dependency  | required by            | src                                           |
604
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
37
 |-------------+------------------------+-----------------------------------------------|
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
38
 | Blake3      | ffi/blake3             | https://vc.compiler.company/packy/blake3      |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
39
 | Tree-sitter | ffi/tree-sitter        | https://vc.compiler.company/packy/tree-sitter |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
40
 | Uring       | ffi/uring              | https://vc.compiler.company/packy/uring       |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
41
 | Btrfs       | ffi/btrfs              | https://vc.compiler.company/packy/btrfs       |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
42
 | Ublksrv     | ffi/ublk               | https://vc.compiler.company/packy/ublksrv     |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
43
 | OpenSSL     | lib/net                | [[https://vc.compiler.company/packy/openssl]]     |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
44
 | RocksDB     | ffi/rocksdb            | https://vc.compiler.company/packy/rocksdb     |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
45
 | Git         | lib/vc/git             | https://vc.compiler.company/packy/git         |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
46
 | Hg          | lib/vc/hg              | https://vc.compiler.company/packy/hg          |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
47
 | Zstd        | ffi/zstd               | https://vc.compiler.company/packy/zstd        |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
48
 | Qemu        | lib/box                | https://vc.compiler.company/packy/qemu        |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
49
 | Podman      | lib/pod                | https://vc.compiler.company/packy/podman      |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
50
 | Emacs       | emacs                  | https://vc.compiler.company/packy/emacs       |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
51
 | StumpWM     | lib/gui/wm/x11/stumpwm | https://vc.compiler.company/packy/stumpwm     |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
52
 | Readline    | ffi/readline           | [[https://vc.compiler.company/packy/readline]]    |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
53
 | Keyutils    | ffi/keyutils           | [[https://vc.compiler.company/packy/libkeyutils]] |
74a55d5decce emacs org libraries and upgrades
Richard Westhaver <ellis@rwest.io>
parents: 585
diff changeset
54
 | Mpd         | lib/aud/mpd            | https://vc.compiler.company/packy/mpd         |
287
609931bd65ba organ updates, readme.org
Richard Westhaver <ellis@rwest.io>
parents: 187
diff changeset
55
 
473
dee36ea63090 skelfile work
Richard Westhaver <ellis@rwest.io>
parents: 472
diff changeset
56
 * Build
472
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
57
 The Core consists of two major system: the *lisp* system and the
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
58
 *rust* system. There is also an auxiliary *emacs* system containing a
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
59
 complete Emacs IDE configuration which serves as the base for user
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
60
 customizations.
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
61
 
473
dee36ea63090 skelfile work
Richard Westhaver <ellis@rwest.io>
parents: 472
diff changeset
62
 Building the core will produce its output to the =.stash= directory by
dee36ea63090 skelfile work
Richard Westhaver <ellis@rwest.io>
parents: 472
diff changeset
63
 default. You can then test, run, and install the resulting files or
dee36ea63090 skelfile work
Richard Westhaver <ellis@rwest.io>
parents: 472
diff changeset
64
 package them up to be shipped elsewhere.
444
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
65
 ** From Source
472
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
66
 *** Lisp
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
67
 The Lisp Core can be found under the =lisp= directory. It is the
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
68
 largest system, most actively developed, and is intended to cover the
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
69
 complete surface of the user-facing APIs contained in the core.
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
70
 
656
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
71
 The core is self-hosted in the sense that it is intended to be built
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
72
 from one of its own programs - the =skel= project compiler. You may
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
73
 also load any part of the core individually as long as you have [[https://www.sbcl.org/][SBCL]]
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
74
 and [[https://www.quicklisp.org/beta/][Quicklisp]] installed.
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
75
 *** Rust
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
76
 Today, the Rust components of the core are quite small and
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
77
 isolated. We like Rust right now for the reasonable memory safety
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
78
 guarantees, as an interface to (W)GPU, WASM, LLVM, etc, and because it
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
79
 has an industry-sponsored ecosystem (guaranteed future). 
472
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
80
 
656
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
81
 Our Rust code is far less concerned with being completely from
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
82
 scratch - dependencies are imported freely and at will - adapting to
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
83
 whatever FOTM is hot right now.
472
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
84
 
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
85
 A workspace is configured such that you can build all components with
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
86
 the following command (~NOTE~ - takes a long time):
444
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
87
 #+begin_src shell :exports both :results output
656
b499d4bcfc39 removed x.lisp
Richard Westhaver <ellis@rwest.io>
parents: 643
diff changeset
88
   cd rust && cargo build
444
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
89
 #+end_src
da326d26262e rm cc-install and tz
Richard Westhaver <ellis@rwest.io>
parents: 406
diff changeset
90
 
472
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
91
 *** Emacs
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
92
 The core contains a collection of Emacs Lisp libraries under =emacs=
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
93
 which may be installed for the current user using the corresponding
56ed92178adb readme update
Richard Westhaver <ellis@rwest.io>
parents: 444
diff changeset
94
 Makefile.