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

Last change on this file since 36801 was 36801, checked in by evhan, 12 months ago

wiki/eggref: update docs/formatting/urls and eggref/5/{r7rs,fancypants,chicken-belt}

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