#generation #grammar #l-systems #procedural-generation #procedural

bin+lib rusty-systems

A library for procedurally generating content using L-Systems

5 releases (major breaking)

4.0.0 Jun 9, 2024
3.0.0 Jun 7, 2024
2.0.0 Jun 2, 2024
1.0.0 May 24, 2024
0.3.0 May 18, 2024

#2 in #procedural-generation

Download history 152/week @ 2024-05-13 147/week @ 2024-05-20 145/week @ 2024-05-27 284/week @ 2024-06-03 51/week @ 2024-06-10

651 downloads per month

MIT license

105KB
2.5K SLoC

Build things with L-Systems

Github tests Cargo Docs.rs documentation

rusty-systems is a crate for procedurally generating content using L-Systems. It can be installed from https://crates.io/crates/rusty-systems:

cargo add rusty-systems

This project is still in its early days and might undergo rapid changes. See the crate docs for more information on how to use this library.

Here is a brief (and trivial) example of using the library

use rusty_systems::prelude::*;

let system = System::new();
system.parse_production("CompanyName -> Surname Surname").unwrap();

let starting_axiom = system.parse_prod_string("CompanyName").unwrap();
let result = system.derive(starting_axiom, RunSettings::default()).unwrap().unwrap();

println!("The resulting string is:\n{}", system.format(&result).unwrap());

Documentation

Installation

The most recent released version of the crate can be installed by adding it to your projects crate.toml file:

cargo add rusty-systems

You can also install any of the tagged development versions using git:

[dependencies]
rusty-systems = {git = "https://github.com/TheRiver/rusty-systems.git", tag = "2.0.0"}

License

This code is licensed under the MIT license. See the LICENSE file for more details.

Dependencies

~240–760KB
~10K SLoC