Rant is a high-level language for templating and procedural generation. Easily create dynamic templates, dialogue, stories, names, test data, and much more.
WARNING:
This project is in alpha. Expect to see broken/missing features.
While I encourage you to try it out and give feedback, please do not use in production environments until a stable version is released.
Features may appear or disappear at any time for any reason. Assume that every alpha release will be breaking.
Introducing Rant 4
Rant 4 is a complete remake of the Rant language and runtime. It delivers a vastly improved user experience designed around the needs of everyone-- from writers and programmers, to anybody else!
Intuitive syntax
Think of Rant as the opposite of Regex: just as a regular expression compares inputs to a pattern, Rant generates matching outputs from a pattern!
Consider this regex:
(foo|bar|baz)
The Rant equivalent is nearly identical:
{foo|bar|baz} # Resolves randomly to "foo", "bar", or "baz"
Concise operations
Rant's standard library provides built-in utilities for many common use cases, cutting down on the amount of boilerplate you need to write.
Even for more complex generation tasks, Rant has your back. With its powerful set of synchronization, branching, and generation tools, you can get results with far less code than conventional programming languages.
Flexible applications
Rant does more than randomization: its behavior is infinitely configurable for a wide range of use cases ranging from natural language generation to simple code templating. What you do with it is up to you!
Need to work with structured data rather than just strings? No problem. Rant offers a fully-featured object model including common primitives like numbers and booleans as well as collection types like maps and lists.
Getting started
CLI
Rant comes with a CLI tool that includes a REPL. You can install and run it with:
Library
Add Rant to your Cargo.toml
:
[]
= "*"
You can run a Rant program with just a few lines of code:
use Rant;
use Error;
Documentation
The latest documentation can be found at the official docs.rant-lang.org.
Since Rant 4 is early in development, some documentation may be outdated/incomplete, but it is actively updated to ensure that it reflects current features with reasonable accuracy.
License
Rant is distributed under the GNU Affero General Public License v3. See LICENSE for more details.
An alternative, commercial license is planned for the future.