Skip to content
/ corn Public
forked from corn-config/corn

🌽 A simple and pain-free configuration language. Reference libcorn implementation and CLI.

License

Notifications You must be signed in to change notification settings

morr0ne/corn

This branch is up to date with corn-config/corn:master.

Folders and files

NameName
Last commit message
Last commit date
Mar 5, 2025
Jun 15, 2023
Jun 16, 2024
Mar 5, 2025
Mar 5, 2025
Jun 15, 2023
Mar 5, 2025
Mar 5, 2025
Oct 19, 2022
Oct 19, 2022
Mar 5, 2025
Mar 5, 2025
Mar 5, 2025
Jan 26, 2022
Mar 5, 2025

Repository files navigation

🌽 Corn

A simple and pain-free configuration language.

Corn has been designed using inspiration from JSON and Nix to produce a language that's easy and intuitive to write, good for config files, and has a feature-set small enough you can learn it in minutes. It was born out of the following frustrations:

  • JSON is not a config language, despite how often people use it as one.
  • TOML is good for flat structures but gets ugly quickly with deeper objects.
  • YAML is far too complex and its whitespace rules make it error-prone.
  • Nix is a full-sized language and not easy to integrate.


let {
    $entry = "dist/index.js"
    $author = { name = "John Smith" email = "[email protected]" }
} in {
    name = "example-package"
    version = "1.0.0"
    main = $entry
    bin.filebrowser = $entry
    private = false

    author = $author
    author.url = "https://example.com"

    contributors = [ $author ]

    scripts.build = "tsc"
    scripts.run = "node dist"

    dependencies = {
        dotenv = "^8.2.0"
        // put the rest of your deps here...
    }

    devDependencies.typescript = "^4.5"

    config.port = 8080
    config.hostname = null
}

Corn is available as libraries for Rust, Go, Lua, and JavaScript (via WASM).
A CLI and web API are also available.

Editor plugins are available for JetBrains IDEs, VS Code and Neovim.

About

🌽 A simple and pain-free configuration language. Reference libcorn implementation and CLI.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 98.4%
  • Shell 1.4%
  • JavaScript 0.2%