aboutsummaryrefslogtreecommitdiff
path: root/docs/types_of_rocks.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/types_of_rocks.md')
-rw-r--r--docs/types_of_rocks.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/types_of_rocks.md b/docs/types_of_rocks.md
new file mode 100644
index 00000000..7e69253d
--- /dev/null
+++ b/docs/types_of_rocks.md
@@ -0,0 +1,32 @@
1# Types of rocks
2
3A **rock** is a bundle containing a specification file (called a "rockspec")
4and files providing Lua modules.
5
6A **[rockspec](rockspec_format.md)** is a Lua file containing a series of
7assignments to variables that provide various information about the rock, such
8as description metadata, dependency relations and build rules. Rocks are
9created from rockspecs.
10
11When packed, a rock is an archive file in ZIP format, with the .rock filename
12extension. When installed, a rock is unpacked into a directory in the local
13rocks repository.
14
15There are several types of rocks, and when packed they are identified by their
16filename extensions. These are:
17
18* Source rocks (`.src.rock`): these contain the rockspec and the source code
19 for the Lua modules provided by the rock. When installing a source rock, the
20 source code needs to be compiled.
21
22* Binary rocks (`_.system-arch_.rock`: `.linux-x86.rock,
23 .macosx-powerpc.rock`): these contain the rockspec and modules in compiled
24 form. Modules written in Lua may be in source .lua format, but modules
25 compiled as C dynamic libraries are compiled to their platform-specific
26 format.
27
28* Pure-Lua rocks (`.all.rock`): these contain the rockspec and the Lua modules
29 they provide in .lua format. These rocks are directly installable without a
30 compilation stage and are platform-independent.
31
32