Skip to content

Fundiman/jade-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<!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 &amp;&amp; cd build
meson setup ..
ninja

# build jvk
cd ../../jvk
mkdir build &amp;&amp; cd build
meson setup ..
ninja

# build stdlib
cd ../../jade_stdlib
mkdir build &amp;&amp; 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>

About

Documentation for JadeLang.

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages