source: project/wiki/eggref/5/beaker @ 37462

Last change on this file since 37462 was 37462, checked in by evhan, 8 months ago

wiki/beaker: add link to source repo

File size: 4.7 KB
Line 
1== Beaker
2
3Lab supplies for CHICKEN Scheme.
4
5[[toc:]]
6
7== Description
8
9Beaker is a collection of development tools.
10
11It is currently fairly limited, including only two programs and a small
12handful of libraries to make common development tasks easier. If you
13have an idea for something that would be useful to include, don't
14hesitate to contact the [[#author|author]].
15
16The project's source is available [[https://git.sr.ht/~evhan/beaker|here]].
17
18== Dependencies
19
20* [[/eggref/5/begin-syntax|begin-syntax]]
21* [[/eggref/5/debugger-protocol|debugger-protocol]]
22* [[/eggref/5/schematic|schematic]]
23* [[/eggref/5/srfi-1|srfi-1]]
24* [[/eggref/5/srfi-13|srfi-13]]
25* [[/eggref/5/srfi-14|srfi-14]]
26* [[/eggref/5/srfi-69|srfi-69]]
27* [[/eggref/5/vector-lib|vector-lib]]
28* [[/eggref/5/with-current-directory|with-current-directory]]
29
30== Programs
31
32=== chicken-clean
33
34 Usage: chicken-clean [-interactive | -quiet | -verbose]
35
36The {{chicken-clean}} program deletes egg build artifacts.
37
38A simple set of file patterns is used to determine what should be
39deleted. This includes compiled programs, binary objects ({{o}}, {{obj}},
40{{so}}, {{dll}}), and files generated by the CHICKEN toolchain ({{build.sh}},
41{{install.sh}}, {{import.scm}}, {{inline}}, {{profile}}, {{types}}).
42
43When run with the {{-interactive}} flag, a confirmation prompt will be
44displayed before any files are deleted.
45
46=== chicken-lint
47
48 Usage: chicken-lint [csc-options ...] filename ...
49
50The {{chicken-lint}} program checks a source file with a set of simple
51lint rules.
52
53Potential problems are written as S-expressions to standard error.
54
55Note that this program invokes {{csc}}, so any compile-time code in the
56program will be executed.
57
58== Extensions
59
60=== Repository Management
61
62The {{(beaker repository)}} library provides a handful of procedures
63to help manage egg repositories.
64
65<procedure>(chicken-install)</procedure>
66
67Returns the full pathname of the {{chicken-install}} command.
68
69<procedure>(egg-files #!optional (path repository-path))</procedure>
70
71Returns a list of all egg-info files in the repository path.
72
73The {{path}} argument can be used to specify an alternative repository
74path, which should be a thunk returning a list of pathname strings.
75
76<procedure>(create-repository destination #!optional source)</procedure>
77
78Initialises a new egg repository at the pathname {{destination}}.
79
80If the directory {{destination}} doesn't exist, it is created. The core
81CHICKEN libraries are then installed into the repository and a new
82modules database is generated
83
84If a {{source}} repository is given, its contents are also copied into
85the new repository. This can be used to copy an existing repository
86to another location.
87
88=== Systems
89
90The {{(beaker system)}} library provides an API for dynamically
91building, loading, and reloading extension libraries. It's intended
92to help enable rapid development in a manner similar to [[https://common-lisp.net/project/asdf/asdf/index.html|asdf]] from
93Common Lisp or the [[https://wiki.call-cc.org/eggref/4/system|system]] egg from CHICKEN 4.
94
95Rather than introduce a new way to define a system's components and
96dependencies, this library reuses the [[http://wiki.call-cc.org/man/5/Egg%20specification%20format|egg]] specification format.
97In fact, you can generally think of a "system" and an "egg" as one
98and the same.
99
100An example {{csi}} session that loads, edits, and reloads an example
101system might look like the following:
102
103 #;> (import (beaker system))
104 #;> (load-system "example.egg")
105 building example
106 ... output ...
107 ; loading /tmp/temp70d6.29489.example.import.so ...
108 ; loading /tmp/temp4871.29489.example.so ...
109 #;> (load-system "example.egg")
110 building example
111 #;> ,e example.scm
112 #;> (load-system "example.egg")
113 building example
114 ... output ...
115 ; loading /tmp/temp44a2.29609.example.so ...
116
117Modules are imported automatically and import libraries are reloaded
118whenever a module's exports list changes. Note that removing a value
119from a module's export list does not remove it from the session when
120the extension is reloaded.
121
122<procedure>(compile-system egg-file)</procedure>
123
124Compiles all out-of-date components for the given egg.
125
126This is equivalent to running {{chicken-install -no-install}}.
127
128<procedure>(clean-system egg-file)</procedure>
129
130Deletes all compiled programs and extension libraries for the given egg.
131
132Auxiliary files such as import libraries are preserved.
133
134<procedure>(load-system egg-file #!key (skip (quote ())))</procedure>
135
136Builds and loads the given egg.
137
138When called for the first time, all out-of-date components are
139recompiled, the egg's extension libraries are loaded into the calling
140program and its modules are immediately imported.
141
142Subsequent calls cause the components to be recompiled and reloaded
143as necessary.
144
145== Author
146
147[[/users/evan-hanson|Evan Hanson]]
148
149== License
150
1513-Clause BSD
152
153[[tags: egg]]
Note: See TracBrowser for help on using the repository browser.