82 lines
2.6 KiB
Plaintext
82 lines
2.6 KiB
Plaintext
---
|
|
import ManualLayout from '../layouts/ManualLayout.astro';
|
|
|
|
const example = `Port = Int >= 1 & <= 65535 default 8080;
|
|
|
|
Server = {
|
|
host = String default "localhost";
|
|
port = Port;
|
|
};
|
|
|
|
Production = Server & {
|
|
host = "example.com";
|
|
};`;
|
|
---
|
|
<ManualLayout title="Decodal" frontpage>
|
|
<section class="hero">
|
|
<h1>Decodal keeps configuration, constraints, and defaults in one composable value.</h1>
|
|
<p class="hero-copy">
|
|
Define structured data with constraints, compose it with patches, and materialize the result from Rust,
|
|
WebAssembly, or the browser playground.
|
|
</p>
|
|
<div class="hero-actions">
|
|
<a class="button primary" href="/playground/">Try the playground</a>
|
|
<a class="button secondary" href="/docs/introduction/">Read the manual</a>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="home-packages" aria-label="Official packages">
|
|
<h2>Official packages</h2>
|
|
<div class="package-links">
|
|
<a href="https://crates.io/crates/decodal">
|
|
<span>Rust crate</span>
|
|
<strong>crates.io/crates/decodal</strong>
|
|
</a>
|
|
<a href="https://www.npmjs.com/package/decodal-wasm">
|
|
<span>npm package</span>
|
|
<strong>npmjs.com/package/decodal-wasm</strong>
|
|
</a>
|
|
<a href="https://jsr.io/@hare/decodal-wasm@0.1.2">
|
|
<span>JSR package</span>
|
|
<strong>jsr.io/@hare/decodal-wasm</strong>
|
|
</a>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="home-grid" aria-label="Decodal overview">
|
|
<article class="home-card">
|
|
<h2>What it is</h2>
|
|
<p>
|
|
Decodal is a small data language for configuration shapes that need validation, defaults,
|
|
lazy imports, and predictable composition.
|
|
</p>
|
|
</article>
|
|
<article class="home-card">
|
|
<h2>Where it runs</h2>
|
|
<p>
|
|
Use the Rust crate for runtime embedding, the WASM package in browsers, CodeMirror/Lezer for the Web editor,
|
|
and Tree-sitter for general editor integration.
|
|
</p>
|
|
</article>
|
|
<article class="home-card">
|
|
<h2>Start here</h2>
|
|
<p>
|
|
Open the playground to run examples in your browser, or read the components page to see how the runtime and
|
|
editor pieces fit together.
|
|
</p>
|
|
<p><a href="/docs/components/">View components →</a></p>
|
|
</article>
|
|
</section>
|
|
|
|
<section class="home-example" aria-label="Decodal example">
|
|
<div>
|
|
<h2>A compact example</h2>
|
|
<p>
|
|
Constraints and defaults are values. Compose them with concrete data and materialize when the host knows what
|
|
output shape it expects.
|
|
</p>
|
|
</div>
|
|
<pre><code>{example}</code></pre>
|
|
</section>
|
|
</ManualLayout>
|