diff --git a/docsite/Makefile b/docsite/Makefile index fcc345b..ad24f44 100644 --- a/docsite/Makefile +++ b/docsite/Makefile @@ -24,7 +24,7 @@ content := $(shell find site/content -type f -iname *.md) site/.built: $(content) cd site; \ - gutenberg build -o generated + zola build -o generated touch site/.built gensite: site/.built diff --git a/docsite/site/content/_index.md b/docsite/site/content/_index.md index f2fe24a..f50baec 100644 --- a/docsite/site/content/_index.md +++ b/docsite/site/content/_index.md @@ -4,22 +4,122 @@ in_seach_index = true +++ [UCG](https://crates.io/crates/ucg) is a universal grammar for configuration. -It's goal is not to define a configuration format like JSON, YAML, or TOML. It -is not intended to replace the other configuration formats. Instead it is + +# Why another config format? + +That's a good question. The world certainly doesn't need another serialization +format for configuration values. We probably haven't really needed another +serialization format since `ini` files and `xml`. But now that we do have so +many to choose from people are choosing them right and left. + +Chances are if you manage more than 2 systems in your job then you have at +least 2 different serialization formats for their configuration. You probably +also have parts of that configuration that are shared between multiple systems +and need to be kept in sync between those different formats. + +You might also have standard configs for vm based languages or deployment +targets like kubernetes. You also probably have a configuration management +system and it probably has some form of templating support to meet all of those +needs. UCG is meant to solve the problems that the templating engine +introduces. + +Templates can be difficult to manage without introducing hard to see errors in +the serialization format they are generating. Most templating engines aren't +aware of the format they are templating. They usually end up being an ad-hoc +programming language in their own right but without any way to enforce +invariants or protect the template writer from creating bad configs. UCG +attempts to solve this problem by giving you a real programming language +that also generates the config format you need natively and safely. + +## UCG is not a config serialization format + +UCG's goal is not to define a configuration format like JSON, YAML, or TOML. It +is not intended to replace the other serialization formats. Instead it is intended to provide a common grammar for generating those formats. Currently -UCG is able to generate conversions for the following formats. +UCG is able to compile into a number of formats including: * Environment Variables -* Command Line Flags -* An executable shell launch script combining the two above +* An executable shell launch script * JSON * YAML * TOML +* XML -UCG allows you to use one common grammar to generate configuation values for any applications that -use one of provided conversion outputs while also allowing you to easily share common configuration -values like hostnames, jvm settings, and database settings. +## UCG is not a templating engine -UCG can build an entire directory of files or a single file. +UCG is not a templating language. It is a compiler whose targets are specific +serialization formats. As such it doesn't output invalid formats in, for +example, `json` or `yaml`. It allows you to check configurations against +schemas. It lets you use shared logic when assembling the datastructures that +your config format. + +UCG allows you to use one common grammar to generate configuation values for +any applications that use one of provided serialization formats while also +allowing you to easily share common configuration values like hostnames, jvm +settings, and database settings. + +UCG is designed to make configuration as code a first class citizen of your +deployment strategy. + +# UCG is not alone + +When I started UCG I was unaware of some other attempts at this that came before. If you find UCG intriguing you might be interested in these other projects with similar goals. + + +
UCG | JSonnet | Dhall | +|
---|---|---|---|
Variables | x | x | x | +
Conditionals | x | x | x | +
Functions | x | x | x | +
Modules/Classes | x | x | x | +
Imports | x | x | x | +
Std Lib | Minimal | x | Prelude | +