{"id":13571766,"url":"https://github.com/rant-lang/rant","last_synced_at":"2025-05-16T04:14:08.249Z","repository":{"id":45063005,"uuid":"279382980","full_name":"rant-lang/rant","owner":"rant-lang","description":"Rant - The templating language for procedural generation.","archived":false,"fork":false,"pushed_at":"2022-05-20T19:43:13.000Z","size":856,"stargazers_count":208,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-10T07:05:39.831Z","etag":null,"topics":["crates","language","mocking","probabilistic-programming","procedural-generation","procedural-programming","procedural-text","procgen","programming-language","rant","rant-lang","rant4","rust","rust-crate","rust-library","scripting","template-language","templating","text-generation"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rant-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["TheBerkin"]}},"created_at":"2020-07-13T18:35:09.000Z","updated_at":"2025-03-01T10:51:32.000Z","dependencies_parsed_at":"2022-09-18T03:11:56.382Z","dependency_job_id":null,"html_url":"https://github.com/rant-lang/rant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rant-lang%2Frant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rant-lang%2Frant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rant-lang%2Frant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rant-lang%2Frant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rant-lang","download_url":"https://codeload.github.com/rant-lang/rant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247147704,"owners_count":20891746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crates","language","mocking","probabilistic-programming","procedural-generation","procedural-programming","procedural-text","procgen","programming-language","rant","rant-lang","rant4","rust","rust-crate","rust-library","scripting","template-language","templating","text-generation"],"created_at":"2024-08-01T14:01:05.938Z","updated_at":"2025-04-04T08:32:14.017Z","avatar_url":"https://github.com/rant-lang.png","language":"Rust","funding_links":["https://github.com/sponsors/TheBerkin"],"categories":["Rust"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/s9jMDhI.png\" alt=\"Rant Logo\" \u003e\u003c/img\u003e\n\u003c/p\u003e\n\n[![Crates.io](https://img.shields.io/crates/v/rant)](https://crates.io/crates/rant)\n[![Docs.rs](https://docs.rs/rant/badge.svg)](https://docs.rs/rant)\n[![Discord](https://img.shields.io/discord/332251452334669834?color=6C8BD5\u0026label=discord\u0026logo=discord\u0026logoColor=%23fff)](https://discord.gg/U8Bj6gSshJ)\n\n**Rant** is a dynamically-typed, multi-paradigm templating language designed primarily for procedural generation. It is designed with scalability in mind: it can handle tasks ranging from simple randomized string generation to more complex workloads such as procedural dialogue, character generation, and worldbuilding.\n\n***\n\n\u003e ## **Prerelease notice**\n\u003e\n\u003e **This project is in alpha.**\n\u003e **This means that the API is unstable, functionality may be broken/missing, and everything is subject to change.**\n\u003e\n\u003e **Please dont hesitate to try it out and give feedback; however, _do not_ use in production environments until a stable version is released.**\n\u003e\n\u003e **Features may appear/disappear at any time for any reason. Assume that every alpha release will have breaking changes.**\n\n\n## Introducing Rant 4\n\nRant is the result of a long-standing desire for an all-in-one data templating tool made especially for creative applications like games and interactive art.\n\nRant 4 is the next leap forward in achieving this goal: the syntax, standard library, and interpreter have all been completely reimagined from the ground up.\n\n## Features\n\n🧰 **Painless API** \u003cbr/\u003e \nRant has a no-nonsense API designed for ease of use.\nNo getting lost in configuration hell. Integrating Rant into your project only takes a few lines of code.\n\n💻 **Cross-platform** \u003cbr/\u003e \nWrite once, run anywhere! The runtime works the same across Windows, Mac, Linux, and WebAssembly.\n\n✍ **Templating that does more** \u003cbr/\u003e\nRant is all about \"printing\": each lexical scope has an output to print (append values) to, which then prints itself to the parent output, and so on.\nThis enables you to intuitively build strings, collections, and more in a familiar templating setting.\n\n🎨 **Now *intentionally* Turing-complete!** \u003cbr/\u003e \nIn addition to being a templating language, Rant adopts declarative and imperative programming concepts with design influences from many other popular languages.\n\n✨ **Generate anything \u0026mdash; not just text** \u003cbr/\u003e\nUnlike older Rant versions that could only generate strings, Rant 4 can output arbitrary data structures using any of the built-in data types. Enjoy first-class support for common primitives like strings, numbers, collections, closures, and more.\n\n🎲 **Built with ♥ for RNG** \u003cbr/\u003e\nRant is made with random generation in mind as a major use-case. \n\nMake use of a wide array of built-in utilities for generating random numbers, strings, booleans, lists, list subsets, and much more for all your randomization needs. \nThe internal RNG can be manually seeded to produce repeatable outputs.\n\n🔱 **Branching and beyond** \u003cbr/\u003e \nAugment regular control flow behavior with a multitude of configuration options for iterative, randomized, and weighted branch selection.\n\n🧬 **Delightful combinatorics** \u003cbr/\u003e\nPerform nested mappings, filters, zips, combinations, and more with minimal effort.\nRant's powerful piping syntax lets you perform complex operations with shorter, more readable code.\n\n📝 **Automatic text formatting** \u003cbr/\u003e\nPassively format text output with automatic capitalization, whitespace normalization, and number formatting \u0026mdash; including built-in support for numerous writing systems.\n\n📦 **Data sources** \u003cbr/\u003e\nAttach custom data sources to your Rant execution context to give your scripts controlled access to external resources.\n\n🧩 **Simple module system** \u003cbr/\u003e \nSharing code between Rant programs is trivial. Just write your module script and `@require` it elsewhere.\n\nNeed custom module resolution logic? No problem. You can write your own resolver and just plug it in.\n\n📚 **Rant Standard Library** \u003cbr/\u003e \nA comprehensive standard library provides the tools needed to quickly iterate on your ideas.\n\n🧪 **Use integrated or standalone** \u003cbr/\u003e\nWhether you want to integrate Rant directly into a product or use it as a standalone tool to assist with writing, Rant has a place in any part of your workflow.\n\n## Getting started\n\nRant is written in [Rust](https://rust-lang.org), so you'll need to install [the toolchain](https://www.rust-lang.org/tools/install) in order to build it.\n\n### CLI\n\nRant's CLI can run Rant code from files or the command line.\nInstall it from Cargo with:\n\n```sh\n$ cargo install rant --version 4.0.0-alpha.33 --features cli\n```\n\nThen run it:\n\n```sh\n# Launch the REPL\n$ rant\n\n# Get a full list of options\n$ rant -h\n\n# Run an inline script and display output\n$ rant -e '[rep:3] [sep:\\s] {b{ee|i|o|u}bbity}'\n\n# Run hello_world.rant and send output to result.txt\n$ rant hello_world.rant \u003e result.txt\n```\n\n### Library\n\nTo use Rant in a Rust project, add the `rant` crate to `Cargo.toml`:\n\n```toml\n[dependencies]\nrant = \"*\"\n```\n\nYou can run a Rant program with just a few lines of code:\n\n```rust\nuse rant::Rant;\nuse std::error::Error;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n  // Create a default Rant context\n  let mut rant = Rant::new();\n\n  // Compile a simple program\n  let program = rant.compile_quiet(r#\"\n  [$greet:name] {\n    {Hello|Hi|Hey} \u003cname\u003e!\n  }\n  [greet:world]\n  \"#)?;\n\n  // Run the program and print the output\n  let output = rant.run(\u0026program)?;\n  println!(\"{}\", output);\n\n  Ok(())\n}\n```\n\n## [Examples](./examples/)\n\nThis repository includes a collection of example Rant scripts for you to learn from. Check them out!\n\n## Documentation\n\nThe latest reference documentation can be found at **[docs.rant-lang.org](https://docs.rant-lang.org)**.\n\nSince 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.\n\n\n## [Changelog](./CHANGELOG.md)\n\nThe changelog is updated constantly throughout the development process, providing a complete summary of upcoming changes at a glance even before the next release.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frant-lang%2Frant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frant-lang%2Frant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frant-lang%2Frant/lists"}