A simple structured data syntax for

  • Configuration
  • Content authoring
  • DSLs

Terrace gets out of your way to let you

  • just write
Get Started
Terrace
title Terrace - A simple structured data language
description
  A simple structured data syntax for configuration, content authoring, and DSLs.
  Terrace gets out of your way to let you just write
markdown
  A simple structured data syntax for
    - **Configuration**
    - **Content authoring**
    - **DSLs**
    
  Terrace gets out of your way to let you
    - **just write**
JSON
{
  "title": "Terrace - A simple structured data language",
  "description": "A simple structured data syntax for configuration, content authoring, and DSLs.\nTerrace gets out of your way to let you just write",
  "markdown": "A simple structured data syntax for\n  - **Configuration**\n  - **Content authoring**\n  - **DSLs**\n\nTerrace gets out of your way to let you\n  - **just write**"
}
YAML
title: Terrace - A simple structured data language
description: |
  A simple structured data syntax for configuration, content authoring, and DSLs.
  Terrace gets out of your way to let you just write
markdown: |
  A simple structured data syntax for
    - **Configuration**
    - **Content authoring**
    - **DSLs**
    
  Terrace gets out of your way to let you
    - **just write**
TOML
title = "Terrace - A simple structured data language"
description = """
A simple structured data syntax for configuration, content authoring, and DSLs.
Terrace gets out of your way to let you just write"""
markdown = """
  A simple structured data syntax for
    - **Configuration**
    - **Content authoring**
    - **DSLs**
    
  Terrace gets out of your way to let you
    - **just write**"""

Uses

Terrace’s concise syntax (or lack thereof) makes it a great fit for configuration files. Less verbose than JSON without the wild unpredictability and hidden syntax pitfalls that come with YAML.

If you wish, you can build in your own input validation and type casting while parsing configuration files.

An unopinionated, indent-based syntax allows fulls blocks of plain-text or markup languages (such as markdown) to be embedded inside of Terrace documents.

This enables effortless mixing of data, prose, and functional blocks in human-written documents. No more need for clumsy frontmatter or custom Markdown extensions!

Terrace documents, at their core, are effectively their own AST (Abstract Syntax Tree). Every time you parse a Terrace document you’ve essentially parsed your own DSL.

The core libraries are designed with this in mind, exposing ergonomic tools while getting out of your way as much as possible, so you can make Terrace your own.

See Examples

Core

Tiny - Really Tiny

The C version of the core parser is ~30 lines. Most other implementations are of comparable size.

Easy to Implement

Need to use Terrace in another runtime? The tiny core and reliance on rudimentary control structures makes that a cinch!

Zero Dependencies

All Terrace implementations rely only on the built-ins of their language. The header-only C core has no dependencies, not even libc.

No Dynamic Memory

Terrace allocates no dynamic memory of its own, working entirely on the stack. A great fit for resource-constrained environments.

Unopinionated

Terrace makes as few assumptions as possible about how you intend to use it, leaving you with the tools you need to use it as you see fit.

Available in 3+ languages

At launch, Terrace has a reference C implementation, a TypeScript/JavaScript implementation, and a Python version available as well. We’ll be adding more as time permits!

Add a Language

Learn More

Why does Terrace exist? What is it based on? What are the development goals?

Setup instructions, API documentation, and recipes for how to perform common tasks with Terrace.

Join the community! Help out by answering issues, expanding documentation, or building additional language implementations!

Maintained by the Terrace Team. Find an issue? Let us know!

Site contents licensed under the CC BY 3.0 license
All code examples licensed under the MIT license