Thank you for your interest in contributing to Tilde! This document provides guidelines and information for contributors.
- 🐛 Report bugs - Help us identify and fix issues
- 💡 Suggest features - Share ideas for language improvements
- 📝 Improve documentation - Help make Tilde more accessible
- 🧪 Write tests - Increase code coverage and reliability
- 🔧 Submit code changes - Fix bugs or implement features
- 🌐 Improve examples - Create helpful sample scripts
-
Clone the repository
git clone https://github.com/tj-mc/tilde.git cd tilde -
Install Rust (if you haven't already)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Build and test
cargo build cargo test -
Try the REPL
cargo run
src/lexer.rs- Tokenizes input source codesrc/parser.rs- Builds abstract syntax treesrc/evaluator.rs- Executes parsed codesrc/ast.rs- AST data structuressrc/value.rs- Runtime value typesexamples/- Sample Tilde scriptsdocs/- Documentation filestests/- Integration tests
- Check existing issues to avoid duplicate work
- Open an issue for major changes to discuss the approach
- Fork the repository and create a feature branch
-
Create a descriptive branch name
git checkout -b feature/add-string-functions git checkout -b fix/memory-leak-in-parser
-
Write clear commit messages
git commit -m "Add string manipulation functions (substr, trim, split)" -
Add tests for your changes
- Unit tests in the same file as your code
- Integration tests in
tests/directory - Example scripts in
examples/if relevant
-
Ensure all tests pass
cargo test cargo check -
Update documentation if needed
- Update
docs/SYNTAX.mdfor language changes - Add examples to demonstrate new features
- Update
-
Submit your pull request
- Use a clear, descriptive title
- Reference any related issues
- Explain what changes you made and why
- Follow standard Rust conventions
- Use
cargo fmtto format code - Use
cargo clippyto check for common issues - Write clear, self-documenting code
- Add comments for complex logic
- Unit tests: Test individual functions and edge cases
- Integration tests: Test complete language features
- Example scripts: Demonstrate real-world usage
- Error handling: Test both success and failure cases
# Run all tests
cargo test
# Run specific test module
cargo test evaluator::tests
# Run with output
cargo test -- --nocaptureWhen contributing to Tilde, keep these principles in mind:
- Readability First - Code should be self-explanatory
- Simplicity - Prefer simple solutions over complex ones
- Consistency - Follow existing patterns and conventions
- User Experience - Consider how changes affect script writers
- Performance - Maintain good performance characteristics
Please include:
- Tilde version (
tilde --version) - Operating system and version
- Minimal example that reproduces the issue
- Expected vs actual behavior
- Error messages (if any)
Please include:
- Clear description of the proposed feature
- Use cases and examples
- How it fits with existing language features
- Any implementation ideas you have
To update the project version across all files:
# Update to new version (updates all files automatically)
./tools/update_version.sh 0.2.0
# Get current version
./tools/get_version.shThis ensures version consistency across:
Cargo.tomlandCargo.lock- WebAssembly package configuration
- Web REPL interface
- GitHub Actions workflows
- Documentation
- General questions: Open a discussion on GitHub
- Bug reports: Create an issue with the bug template
- Feature requests: Create an issue with the feature template
By contributing to Tilde, you agree that your contributions will be licensed under the same MIT license that covers the project.
Thank you for helping make Tilde better!