-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontributing.html
More file actions
282 lines (230 loc) · 10.3 KB
/
contributing.html
File metadata and controls
282 lines (230 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>contributing to Jade — jade-docs</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--jade: #1D9E75;
--jade-dim: #0F6E56;
--jade-bg: #E1F5EE;
--ink: #0e1a14;
--ink-dim: #3a5245;
--ink-mute: #7a9e8e;
--paper: #f7faf8;
--card: #ffffff;
--border: #d4e8de;
--mono: 'DM Mono', monospace;
--serif: 'Fraunces', serif;
--sans: 'DM Sans', sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); min-height: 100vh; }
header {
border-bottom: 1px solid var(--border);
padding: 0 2rem;
display: flex;
align-items: center;
justify-content: space-between;
height: 56px;
background: var(--card);
position: sticky;
top: 0;
z-index: 100;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--jade-dim); letter-spacing: -0.02em; }
.logo-version { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-mute); background: var(--jade-bg); padding: 2px 7px; border-radius: 20px; border: 1px solid var(--border); }
nav a { font-size: 0.85rem; color: var(--ink-dim); text-decoration: none; margin-left: 1.5rem; transition: color .15s; }
nav a:hover { color: var(--jade); }
main {
max-width: 780px;
margin: 0 auto;
padding: 3rem 2rem 5rem;
}
h1 { font-family: var(--serif); font-size: 2.2rem; font-weight: 300; color: var(--ink); margin: 0 0 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-family: var(--serif); font-size: 1.4rem; font-weight: 300; color: var(--ink); margin: 2.5rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 1rem; font-weight: 500; color: var(--ink); margin: 1.8rem 0 0.6rem; }
h4 { font-size: 0.9rem; font-weight: 500; color: var(--ink-dim); margin: 1.2rem 0 0.4rem; }
h5, h6 { font-size: 0.85rem; font-weight: 500; color: var(--ink-mute); margin: 1rem 0 0.3rem; }
p { font-size: 0.95rem; line-height: 1.75; color: var(--ink-dim); margin: 0 0 1rem; }
a { color: var(--jade-dim); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 500; color: var(--ink); }
em { font-style: italic; }
code {
font-family: var(--mono);
font-size: 0.82em;
background: var(--jade-bg);
color: var(--jade-dim);
padding: 2px 6px;
border-radius: 4px;
border: 1px solid var(--border);
}
pre {
background: var(--ink);
border-radius: 10px;
padding: 1.2rem 1.4rem;
margin: 1rem 0 1.5rem;
overflow-x: auto;
border: 1px solid #1a2e25;
}
pre code {
font-family: var(--mono);
font-size: 0.82rem;
line-height: 1.65;
background: none;
color: #a8e6cf;
padding: 0;
border: none;
border-radius: 0;
}
ul, ol { padding-left: 1.4rem; margin: 0 0 1rem; }
li { font-size: 0.95rem; line-height: 1.75; color: var(--ink-dim); margin-bottom: 0.2rem; }
li code { font-size: 0.8em; }
blockquote {
border-left: 3px solid var(--jade);
padding: 0.6rem 1rem;
margin: 1rem 0;
background: var(--jade-bg);
border-radius: 0 6px 6px 0;
}
blockquote p { margin: 0; color: var(--jade-dim); font-size: 0.9rem; }
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0 1.5rem;
font-size: 0.88rem;
}
th {
background: var(--jade-bg);
color: var(--jade-dim);
font-weight: 500;
text-align: left;
padding: 8px 12px;
border: 1px solid var(--border);
}
td {
padding: 8px 12px;
border: 1px solid var(--border);
color: var(--ink-dim);
line-height: 1.5;
}
tr:nth-child(even) td { background: var(--paper); }
hr {
border: none;
border-top: 1px solid var(--border);
margin: 2rem 0;
}
footer {
border-top: 1px solid var(--border);
padding: 1.5rem 2rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 1rem;
background: var(--card);
}
footer p { font-size: 0.78rem; color: var(--ink-mute); font-family: var(--mono); }
footer a { color: var(--jade-dim); text-decoration: none; }
footer a:hover { text-decoration: underline; }
@media (max-width: 600px) {
nav { display: none; }
main { padding: 2rem 1rem 4rem; }
h1 { font-size: 1.6rem; }
}
</style>
</head>
<body>
<header>
<a href="index.html" class="logo">
<svg width="28" height="28" viewBox="0 0 100 100">
<polygon points="50,5 85,25 85,75 50,95 15,75 15,25" fill="#E1F5EE" stroke="#1D9E75" stroke-width="3"/>
<polygon points="50,20 72,33 72,67 50,80 28,67 28,33" fill="#1D9E75" opacity="0.3"/>
<polygon points="50,32 64,40 64,60 50,68 36,60 36,40" fill="#1D9E75" opacity="0.65"/>
<circle cx="50" cy="50" r="6" fill="#0F6E56"/>
</svg>
<span class="logo-name">jade-docs</span>
<span class="logo-version">v0.1.0-alpha</span>
</a>
<nav>
<a href="guide/01-getting-started.html">guides</a>
<a href="stdlib/io.html">stdlib</a>
<a href="reference/syntax.html">reference</a>
<a href="https://github.com/Fundiman/JadeLang">github</a>
</nav>
</header>
<main>
<h1>contributing to Jade</h1>
<p>first off — thank you. Jade is a tiny project and every contribution matters.</p>
<hr>
<h2>ways to contribute</h2>
<h3>1. report bugs</h3>
<p>found something broken? open an issue on <a href="https://github.com/Fundiman/JadeLang/issues">Fundiman/JadeLang</a>.</p>
<p>include:</p>
<ul><li>what you did</li><li>what you expected</li><li>what actually happened</li><li>your OS and architecture</li></ul>
<h3>2. fix bugs</h3>
<p>look for issues labeled <code>bug</code> or <code>good first issue</code>. fork the repo, fix it, open a PR.</p>
<h3>3. improve the compiler</h3>
<p><code>jscc</code> has a lot of room to grow:</p>
<ul><li>better error messages</li><li>more type inference</li><li>string interpolation wired into codegen</li><li>async/await codegen</li><li>optimizations</li></ul>
<h3>4. improve jvk</h3>
<p><code>jvk</code> needs:</p>
<ul><li>full LLJIT wiring (currently MCJIT)</li><li>proper dynamic linker for native slices</li><li>async scheduler that actually suspends/resumes</li><li>memory manager with real slab allocator</li></ul>
<h3>5. write stdlib modules</h3>
<p>the following are registered in the import resolver but not implemented yet:</p>
<ul><li><code>jade.stdlib.net</code> — TCP, UDP, HTTP client</li><li><code>jade.stdlib.json</code> — parse, stringify</li><li><code>jade.stdlib.crypto</code> — sha256, uuid, random</li><li><code>jade.stdlib.time</code> — now, sleep, format</li><li><code>jade.stdlib.web</code> — WebApp, Request, Response</li></ul>
<p>pick one, implement it in <code>jade_stdlib/src/</code>, add the C exports, done.</p>
<h3>6. write packages</h3>
<p>build something useful and publish it to <a href="https://github.com/Fundiman/jade-pkgs">Fundiman/jade-pkgs</a> via <code>jpkg publish</code>.</p>
<h3>7. improve docs</h3>
<p>fix typos, add examples, write guides that are missing. docs live at <a href="https://github.com/Fundiman/jade-docs">Fundiman/jade-docs</a>.</p>
<hr>
<h2>development setup</h2>
<pre><code class="language-bash"># clone
git clone https://github.com/Fundiman/JadeLang
cd JadeLang
# build jscc
cd jade/jscc
mkdir build && cd build
meson setup ..
ninja
# build jvk
cd ../../jvk
mkdir build && cd build
meson setup ..
ninja
# build stdlib
cd ../../jade_stdlib
mkdir build && cd build
meson setup ..
ninja</code></pre>
<p>requires: <code>g++</code>, <code>meson</code>, <code>ninja</code>, <code>llvm-18-dev</code>, <code>libsdl2-dev</code> (for JadeUI)</p>
<hr>
<h2>code style</h2>
<ul><li>C++ with <code>c++17</code></li><li>snake_case for variables and functions</li><li>PascalCase for classes and structs</li><li>namespaces: <code>jscc::</code> for compiler, <code>jvk::</code> for kernel, <code>jade::</code> for stdlib</li><li>keep files focused — one class or module per file</li><li>no <code>using namespace std;</code></li></ul>
<hr>
<h2>pull request process</h2>
<ol><li>fork the repo</li><li>create a branch: <code>git checkout -b fix/your-thing</code></li><li>make your changes</li><li>test it builds and runs</li><li>open a PR with a clear description of what you changed and why</li></ol>
<p>PRs that include tests (even just a <code>.jsc</code> file that exercises the fix) get merged faster.</p>
<hr>
<h2>adding a stdlib module</h2>
<ol><li>add the C exports to <code>jade_stdlib/src/yourmodule.cpp</code></li><li>add the header to <code>jade_stdlib/include/yourmodule.hpp</code></li><li>register the symbols in <code>jade/jscc/src/import_resolver.cpp</code> under <code>register_all_builtins()</code></li><li>add the source to <code>jade_stdlib/meson.build</code></li><li>write a <code>.jsc</code> test file</li></ol>
<hr>
<h2>license</h2>
<p>by contributing you agree your code is licensed under LGPL-3.0 (same as JadeLang). docs contributions are licensed under CC BY-NC-SA 4.0.</p>
<hr>
<h2>questions?</h2>
<p>open an issue. we don't have a Discord yet but the GitHub issues work fine. 🫡</p>
</main>
<footer>
<p>© 2026 <a href="https://github.com/Fundiman">Fundiman</a> — <a href="https://github.com/Fundiman/jade-docs">jade-docs</a> — <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></p>
<p><a href="https://github.com/Fundiman/JadeLang">JadeLang</a> · <a href="https://github.com/Fundiman/jade-pkgs">jade-pkgs</a> · <a href="https://github.com/Fundiman/jade-docs">jade-docs</a></p>
</footer>
</body>
</html>