You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/articles/the-rubinius-build-system.mdoc
+107-7Lines changed: 107 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ implementation. A couple folks created fun languages that target Rubinius
26
26
([Atomy](https://github.com/vito/atomy) and
27
27
[Fancy](https://github.com/bakkdoor/fancy) are notable).
28
28
29
+
## build2
30
+
29
31
In the past ten-ish years, a lot has happened in programming languages and
30
32
software. For one, there's a major new build system for C/C++:
31
33
[build2](https://www.build2.org)
@@ -43,38 +45,108 @@ system just must do it its own way, it can remix easily and safely.
43
45
The rest of this article explains in detail how the Rubinius build system
44
46
works.
45
47
48
+
## Scale & Complexity
49
+
50
+
"One of these is not like the others" is the source of a lot of pain and
51
+
suffering in many software systems because even small differences can add
52
+
complexity. Where that difference is managed helps deal with that complexity.
53
+
54
+
Another challenge in systems is their scale. Since software is often
55
+
intangible, it can be hard to get a sense of the scale of it, other than
56
+
looking at all the source files, but even that can't directly show the
57
+
functional complexity of a piece of software.
58
+
46
59
Scale:
47
60
48
61
1. Large galaxy: Linux;
49
62
1. Small galaxy: LLVM;
50
63
1. Solar system: Rubinius;
51
64
1. Jupiter-sized planet: rbx compiler;
52
65
1. Earth-sized planet: Ruby core library;
53
-
1. Large mountain on earth: A library like OpenFHE;
66
+
1. Large mountain on earth: A library like oniguruma;
54
67
1. Big hill: A library like libasio;
55
68
1. A large rock: Python PEG parser;
56
69
1. A smaller rock: CLI11 command line libray.
57
70
58
-
Anything the size of a rock should be a separately-buildable package, and anything larger than a rock should only be a composition of such packages.
71
+
Based on this, we can say that anything the size of a large mountain and
72
+
smaller should be in its own separately-buildable package, and anything larger
73
+
than a rock should only be a composition of such packages.
59
74
60
-
Every biological system is a collection of well-bounded components, most of them microscopic. Only humans, in their infinite "wisdom" conjure something like Bazel.
75
+
Every biological system is a collection of well-bounded components, most of
76
+
them microscopic. Only humans, in their infinite "wisdom" conjure something
77
+
like Bazel.
61
78
62
-
Why would anyone want to install Java to build a C/C++ library?
79
+
Putting planets, solar systems, and galaxies into one package (or one
80
+
monolithic build system), is just begging for a lot of unnecessary complexity
81
+
because the number of "one of these is not like the others" grows and tends to
82
+
get mixed-in places that make changes harder and harder.
83
+
84
+
One reason for this is because without unbreakable boundaries (e.g. that code
85
+
requires a separate `git clone`) "DRY" up the build script or "parameterize" a
86
+
subroutine is often irresistible.
63
87
64
88
## Setting Boundaries
65
89
66
-
Some reasons to put a component in its own repository:
90
+
Scale is one consideration for when to impose some boundaries. Some other
91
+
reasons to put a component in its own repository:
67
92
68
93
* It's in a different programming language;
69
94
* It's not our code;
70
95
* It's only used on some systems;
71
96
* It's one of several viable options;
72
97
* It has particular testing or security concerns;
73
98
74
-
**( This document is a draft work-in-progress. )**
99
+
## Minimum Build Requirements
100
+
101
+
The intended requirements for building a Rubinius component are:
102
+
103
+
1. make
104
+
2. clang/clang++
105
+
3. build2
106
+
107
+
### Makefile
108
+
109
+
```make
110
+
PROJ = rbx
111
+
112
+
# Allow override (e.g., `make VERSION=1.2.3`)
113
+
VERSION ?= $(shell (git describe --tags 2>/dev/null || echo "develop") | sed 's/^v//')
0 commit comments