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]] 10 This repository contains the monolothic core of
[[comp:][The Compiler Company]].
12 To bootstrap the core you will need recent versions of
[[https://www.rust-lang.org/][Rust]],
[[http://www.sbcl.org/][SBCL]], and
13 a C compiler (clang or gcc). Only Unix systems are explicitly
16 Many parts of the core depend on additional libraries which may or may
17 not be provided by your system's package manager. See the dependency
18 matrix below for details.
20 In any case, it is always preferred to make use of the
[[https://vc.compiler.company/comp/infra][infra]] project
21 to reliably provision the host either from source or pre-built
22 platform-specific
[[https://packy.compiler.company/dist][binary distributions]].
25 | dependency | required by | src | 26 |-------------+------------------------+-----------------------------------------------| 27 | Blake3 | ffi/blake3 | https://vc.compiler.company/packy/blake3 | 28 | Tree-sitter | ffi/tree-sitter | https://vc.compiler.company/packy/tree-sitter | 29 | Uring | ffi/uring | https://vc.compiler.company/packy/uring | 30 | Btrfs | ffi/btrfs | https://vc.compiler.company/packy/btrfs | 31 | Ublksrv | ffi/ublk | https://vc.compiler.company/packy/ublksrv | 32 | OpenSSL | lib/net | [[https://vc.compiler.company/packy/openssl]] | 33 | RocksDB | ffi/rocksdb | https://vc.compiler.company/packy/rocksdb | 34 | Git | lib/vc/git | https://vc.compiler.company/packy/git | 35 | Hg | lib/vc/hg | https://vc.compiler.company/packy/hg | 36 | Zstd | ffi/zstd | https://vc.compiler.company/packy/zstd | 37 | Qemu | lib/box | https://vc.compiler.company/packy/qemu | 38 | Podman | lib/pod | https://vc.compiler.company/packy/podman | 39 | Emacs | emacs | https://vc.compiler.company/packy/emacs | 40 | StumpWM | lib/gui/wm/x11/stumpwm | https://vc.compiler.company/packy/stumpwm | 41 | Readline | ffi/readline | [[https://vc.compiler.company/packy/readline]] | 42 | Keyutils | ffi/keyutils | [[https://vc.compiler.company/packy/libkeyutils]] | 43 | Mpd | lib/aud/mpd | https://vc.compiler.company/packy/mpd | 46 The Core consists of two major system: the
*lisp* system and the
47 *rust* system. There is also an auxiliary
*emacs* system containing a
48 complete Emacs IDE configuration which serves as the base for user
51 Building the core will produce its output to the
=.stash= directory by
52 default. You can then test, run, and install the resulting files or
53 package them up to be shipped elsewhere.
55 The core produces a collection of native program binaries, compiled
56 lisp modules in FASL format, as well as web distributions containing
57 the usual suspects (html, css, js) as well as wasm modules.
61 The Lisp Core can be found under the
=lisp= directory. It is the
62 largest system, most actively developed, and is intended to cover the
63 complete surface of the user-facing APIs contained in the core.
65 Starting from a standard Common Lisp environment with at least
66 [[https://www.quicklisp.org/beta/][Quicklisp]] installed, you can execute
=./x.lisp build skel= to build
67 the project compiler and
=./x.lisp run skel= to run it. This tool is a
68 convenience for building and testing different parts of the core from
69 a minimal dependency set.
72 #+begin_src shell :exports both :results output 73 # bootstrap the core build tool
79 This is SBCL 2.4.7:76bbecb68, an implementation of ANSI Common Lisp.
80 More information about SBCL is available at <http://www.sbcl.org/>.
82 SBCL is free software, provided as is, with absolutely no warranty.
83 It is mostly in the public domain; some portions are provided under
84 BSD-style licenses. See the CREDITS and COPYING files in the
85 distribution for more information.
91 x.lisp --- core build tool
104 To test the lisp standard library:
105 #+begin_src shell :results output :exports both 112 This is SBCL 2.4.7:dc890089a, an implementation of ANSI Common Lisp.
113 More information about SBCL is available at <http://www.sbcl.org/>.
115 SBCL is free software, provided as is, with absolutely no warranty.
116 It is mostly in the public domain; some portions are provided under
117 BSD-style licenses. See the CREDITS and COPYING files in the
118 distribution for more information.
132 ; Loading "std/tests"
154 To save the prelude to
=.stash/prelude.core=:
155 #+begin_src shell :results output :noeval t 160 And to install binaries (defaults to
=/usr/local/bin/=):
161 #+begin_src shell :results none :noeval t 167 The Core Rust system can be found under the
=rust= directory.
169 A workspace is configured such that you can build all components with
170 the following command (
~NOTE~ - takes a long time):
171 #+begin_src shell :exports both :results output 172 cd rust && cargo build --release
176 The core contains a collection of Emacs Lisp libraries under
=emacs= 177 which may be installed for the current user using the corresponding
180 ** TODO Bootstrap from packy :experimental: 181 The following can (maybe someday) be used to bootstrap the core without a full
183 #+begin_src shell :results output 184 curl --proto '=https' \
187 https://packy.compiler.company/dist/x86_64-unknown-linux-gnu/bin/sk \
195 This is SBCL 2.4.5, an implementation of ANSI Common Lisp.
196 More information about SBCL is available at <http://www.sbcl.org/>.
198 SBCL is free software, provided as is, with absolutely no warranty.
199 It is mostly in the public domain; some portions are provided under
200 BSD-style licenses. See the CREDITS and COPYING files in the
201 distribution for more information.
207 saving skel to: /home/ellis/comp/core/.stash/skel
213 [undoing binding stack and other enclosing state... done]
214 [performing final GC... done]
215 [saving current Lisp image into /home/ellis/comp/core/.stash/skel:
216 writing 15984 bytes from the static space at 0x50100000
217 writing 339476480 bytes from the dynamic space at 0x1000000000
218 writing 12498752 bytes from the read-only space at 0x74232dc00000
219 writing 0 bytes from the text space at (nil)
224 This section lists all program binaries provided by the core.
226 #+begin_src shell :results output :exports both 232 skel v0.1.1:ce91ffc6cc7a+ --- A hacker's project compiler.
234 usage: skel [global] <command> [<arg>]
237 -h/--help* : print this message
238 -v/--version* : print version
239 -l/--level* : set log level (warn,info,debug,trace)
240 -c/--config* : set a custom skel user config
241 -i/--input* : input source
242 -o/--output* : output target
245 init : initialize a skelfile in the current directory
246 -n/--name : project name
247 new : make a new skel project
248 -n/--name : project name
249 describe : describe a skelfile
250 show : show project slots
251 -f/--file : path to skelfile
252 -u/--user : print user configuration
253 -s/--system : print system configuration
255 -r/--root : repository path
256 id : print the project id
257 inspect : inspect the project skelfile
258 -f/--file : path to skelfile
259 make : build project targets
260 -t/--target : target to build
261 run : run a script or command
262 compile : compile source code
263 build : build programs and libraries
264 dist : distribute build artifacts
265 install : install stuff
267 unpack : unpack stuff
268 bundle : bundle source code
269 unbundle : unbundle source code
270 clean : clean up the project
272 bench : run benchmark
273 status : print the vc status
274 push : push the current project upstream
275 pull : pull the current project from remote
276 clone : clone a remote project
277 commit : commit changes to the project vc
278 edit : edit a project file in emacs.
279 shell : open the sk-shell interpreter
283 #+begin_src shell :results output :exports both 289 organ v0.0.1 --- org-mode toolbox
291 usage: organ [global] <command> [<arg>]
294 -l/--level* : set the log level
295 -h/--help* : print help
296 -v/--version* : print version
299 inspect : inspect an org file
300 show : display local org info
301 describe : describe local org info
306 #+begin_src shell :results output :exports both 312 packy v0.1.0 --- Universal Package Manager
314 usage: packy [global] <command> [<arg>]
317 -l/--level* : set the log level
318 -h/--help* : print help
319 -v/--version* : print version
330 #+begin_src shell :results output :exports both 337 #+begin_src shell :results output :exports both 343 homer v0.1.0 --- user home manager
345 usage: homer [global] <command> [<arg>]
348 -l/--level* : set the log level
349 -h/--help* : print help
350 -v/--version* : print version
351 -f/--force* : use force
361 ** COMMENT alik :rust: 362 #+begin_src shell :results output :exports both 368 ** COMMENT krypt :lisp: 369 #+begin_src shell :results output :exports both 377 Usage: krypt [OPTIONS] [COMMAND]
380 check check service providers and config
382 search Query the Krypt
383 help Print this message or the help of the given subcommand(s)
386 -c, --cfg <CFG> Set the default config file [env: KRYPT_CONFIG_FILE=]
387 -u, --user <USER> Set a user for this command [env: USER=ellis]
388 -l, --level... Set log level
389 -h, --help Print help
390 -V, --version Print version
394 #+begin_src shell :results output :exports both 402 Usage: mailman [OPTIONS] [COMMAND]
406 search Search for items
407 import Import an account
408 export Export an account
409 help Print this message or the help of the given subcommand(s)
412 -c, --cfg <CFG> Set the default config file [env: MAILMAN_CONFIG_FILE=]
413 -u, --user <USER> Set a user for this command [env: USER=ellis]
414 -l, --level... Set log level
415 -h, --help Print help
416 -V, --version Print version