Thank you for your interest in contributing to Bread Crumbs, a programming language designed for testing, simulations, scientific computing, AI planning, and rapid prototyping. Your contributions help us build a powerful and versatile language with unique features like solve, simulate, fork, and trace.
We welcome contributions in various forms:
- Code: Add new features (e.g., support for
tensorinsolve), fix bugs, or optimize the compiler. - Documentation: Improve tutorials, README, or API docs.
- Testing: Write test cases using
testandassertto ensure stability. - Bug Reports: Report issues via GitHub Issues.
- Feature Requests: Suggest ideas to enhance
solve,simulate, or other features.
Before contributing, please read our README to understand the project's goals and features.
- Fork the Repository:
- Click "Fork" on the Bread Crumbs repository.
- Clone Your Fork:
git clone https://github.com/your-username/bread-crumbs.git
cd bread-crumbs- Create a Branch:
git checkout -b feature/your-feature-nameUse descriptive names, e.g., feature/tensor-support or bugfix/parser-crash.
4. Make Changes and Commit:
git commit -m "Add tensor support for solve feature"- Push to Your Fork:
git push origin feature/your-feature-name- Open a Pull Request:
- Go to the original repository and create a Pull Request (PR).
- Provide a clear description of your changes and reference any related issues.
To set up the development environment:
- Clone the repository:
git clone https://github.com/bread-crumbs/bread-crumbs.git
cd bread-crumbs- Build the compiler:
make- Run a Bread Crumbs file:
./breadcrumbs example.brcTo ensure consistency, follow these guidelines for C code in the Bread Crumbs compiler:
- Indentation: Use 4 spaces (no tabs).
- Naming: Use snake_case for variables, functions, and identifiers.
- Function Pointers:
datatype* variable_name;- Structures, Unions, and Enums:
keyword name {
// Fields or members
}- Function Declarations:
datatype function_name(datatype *parameter_name)
{
// Control flow
keyword(...){
// Statements
}
}- Avoid typedef for statements: Use keyword (e.g., struct, enum) directlyExamplele**:
int handle_number(struct token *tok)
{
if(tok->category == CATEGORY_LITERAL && tok->type_literal == LIT_NUMBER){
return tok->value;
}
return 0;
}For Bread Crumbs code (.brc files):
- Use 4 spaces indentation.
- Use snake_case for function and variable names.
- Example:
func add_numbers(var x: int32, var y: int32) -> int32 {
return x + y
}
test check_add {
assert add_numbers(3, 4) == 7
}
All code contributions must include tests to ensure stability. Use the test and assert constructs in Bread Crumbs:
test solve_example {
solve x: int where x * x == 16
assert x == 4 || x == -4
}
Run tests with:
make test- Submit your Pull Request with a clear description.
- A maintainer will review your code within 3-5 days.
- Address any feedback and update your PR.
- Once approved, your changes will be merged.
Please ensure your code:
- Follows the code style guidelines.
- Includes tests for new features or bug fixes.
- Does not introduce breaking changes without discussion.
Join our community to discuss ideas, ask questions, or collaborated Issues: Report bugs or suggest features here
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make Bread Crumbs better!