- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| main.lox | ||
| README.md | ||
buhran
buhran is a modern configuration language written from scratch in Rust. It is designed as an experimental project focused on research, learning, and language development.
The primary goal of this project is to explore compiler and interpreter architectures deeply, ultimately producing a configuration language that is both human-readable and robust.
Project Goal and Philosophy
This project does not aim to be a production-ready tool from day one. Instead, it serves as a research and development (R&D) sandbox to explore several key domains:
- Learning and Implementation: Gaining practical experience with the fundamentals of language design, including Lexing, Parsing, Abstract Syntax Trees (AST), and Evaluation.
- The Power of Rust: Leveraging Rust's memory safety, performance, and modern tooling to build an efficient interpreter pipeline.
- From Imperative to Declarative: Investigating how to transform a traditional, imperative interpreter architecture into a safe, deterministic, and declarative configuration engine.
Our Journey: In the initial phases of development, we are heavily inspired by the architecture outlined in Robert Nystrom's Crafting Interpreters. While we are bootstrapping our interpreter design using the patterns of the "Lox" language, our ultimate objective is to pivot and prune this architecture into a lightweight, data-oriented configuration language.
Roadmap
The development of buhran is organized into three distinct phases:
Phase 1: Foundations and Interpreter Research (Current Phase)
- Porting the tree-walk interpreter architecture from Crafting Interpreters to idiomatic Rust.
- Implementing the Scanner (Lexer) and Parser to generate a structured Abstract Syntax Tree (AST).
- Evaluating basic expressions, variables, and control flows to establish a working runtime.
Phase 2: Evolution and Pruning
- Stripping away side effects, complex loops, and imperative features that do not belong in a configuration language.
- Transitioning the language to be fully declarative and deterministic.
- Designing and optimizing data structures (such as lists, maps, and nested blocks) inspired by formats like JSON, TOML, and HCL.
Phase 3: Customization and Integration
- Building a clean, reusable API to embed the
buhranparser as a library within other Rust projects. - Introducing advanced configuration features such as modular imports and basic templating capabilities.
Getting Started
To run, test, or contribute to this project locally, follow the instructions below.
Prerequisites
- Rust and Cargo (Latest stable version recommended)
Installation and Execution
- Clone the repository:
git clone [https://github.com/your_username/buhran.git](https://github.com/kaanboraoz/buhran.git) cd buhran