{"id":23651450,"url":"https://github.com/athanclark/anabaena","last_synced_at":"2025-10-19T15:17:12.667Z","repository":{"id":65653002,"uuid":"595565568","full_name":"athanclark/anabaena","owner":"athanclark","description":"L-System (Lindenmayer system) framework for Rust","archived":false,"fork":false,"pushed_at":"2023-03-19T23:08:08.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T03:59:16.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/athanclark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-31T10:51:47.000Z","updated_at":"2024-12-12T09:36:32.000Z","dependencies_parsed_at":"2025-02-19T06:39:52.037Z","dependency_job_id":null,"html_url":"https://github.com/athanclark/anabaena","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/athanclark/anabaena","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fanabaena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fanabaena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fanabaena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fanabaena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athanclark","download_url":"https://codeload.github.com/athanclark/anabaena/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athanclark%2Fanabaena/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279828018,"owners_count":26232958,"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","status":"online","status_checked_at":"2025-10-19T02:00:07.647Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-28T16:37:46.337Z","updated_at":"2025-10-19T15:17:12.662Z","avatar_url":"https://github.com/athanclark.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Anabaena\n==========\n\nL-System (Lindenmayer system) for Rust.\n\n## Features\n\n- Generic L-System alphabet\n- Support for [stochastic grammars](https://en.wikipedia.org/wiki/L-system#Stochastic_grammars)\n- Support for [context sensitive grammars](https://en.wikipedia.org/wiki/L-system#Context_sensitive_grammars)\n- Support for [parametric grammars](https://en.wikipedia.org/wiki/L-system#Parametric_grammars)\n- Mutable context support during individual production rules, and summarized after a round is complete\n- Streaming iterator implementation\n\n## Examples\n\n### Algae\n\nTaken from the [Wikipedia article on L-Systems](https://en.wikipedia.org/wiki/L-system#Example_1:_Algae),\nthe following is an implementation of the algae example:\n\n```rust\nuse anabaena::{LSystem, LRulesHash, LRulesSet, Total};\nuse std::collections::HashMap;\nuse streaming_iterator::StreamingIterator;\n\nlet rules: LRulesHash\u003c(), char, LRulesSet\u003cchar\u003e\u003e = |_| HashMap::from([\n    (\n        'A',\n        LRulesSet::new(vec![\n            (1, vec!['A', 'B']),\n        ]),\n    ),\n    (\n        'B',\n        LRulesSet::new(vec![\n            (1, vec!['A']),\n        ]),\n    )\n]);\n\nlet axiom: Vec\u003cchar\u003e = vec!['A'];\n\nlet mut lsystem: LSystem\u003c_,_,_, Total\u003e = LSystem::new(\n    axiom,\n    rules,\n);\n\nassert_eq!(lsystem.next(), Some(\u0026\"AB\".chars().collect()));\nassert_eq!(lsystem.next(), Some(\u0026\"ABA\".chars().collect()));\nassert_eq!(lsystem.next(), Some(\u0026\"ABAAB\".chars().collect()));\nassert_eq!(lsystem.next(), Some(\u0026\"ABAABABA\".chars().collect()));\nassert_eq!(lsystem.next(), Some(\u0026\"ABAABABAABAAB\".chars().collect()));\nassert_eq!(lsystem.next(), Some(\u0026\"ABAABABAABAABABAABABA\".chars().collect()));\nassert_eq!(lsystem.next(), Some(\u0026\"ABAABABAABAABABAABABAABAABABAABAAB\".chars().collect()));\n```\n\n### Examples with Turtle.rs\n\nMost of the other examples in the Wikipedia article are implemented in the `examples/` folder, which\nuse the [turtle.rs library](https://turtle.rs/) to render the results. You can run the B-Tree example,\nfor instance, with the following command:\n\n```bash\ncargo run --example btree\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fanabaena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathanclark%2Fanabaena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathanclark%2Fanabaena/lists"}