Contributing to AdeshLang
We welcome contributions from the community! This guide will help you get started.
Quick Links
- Repository: https://github.com/adeshlang/adeshlang
- Issues: Report bugs and request features
- Discussions: Ask questions and share ideas
- Examples: Browse 443+ examples
Ways to Contribute
1. Bug Reports
Found a bug? Help us by creating a detailed issue report:
Include:
- ✅ AdeshLang version (
adesh --version) - ✅ Platform (OS, version)
- ✅ Steps to reproduce
- ✅ Expected vs actual behavior
- ✅ Code example if possible
Example:
### Description
Compiler crashes when using nested generics with Option type
### Version
AdeshLang v0.3.0
### Platform
Windows 11, Rust 1.75
### Steps to Reproduce
1. Create file with: `let x: Option<Result<i64, string>> = None;`
2. Run: `adesh run test.adesh`
3. Compiler panics with: "type inference failed"
### Expected
Should compile successfully
### Actual
Compiler error: "type inference failed in nested generic"
2. Feature Requests
Have an idea for a new feature? We'd love to hear it!
Before submitting:
- 🔍 Search existing issues to avoid duplicates
- 💡 Explain the use case clearly
- 📝 Provide examples if possible
3. Code Contributions
Getting Started
# Fork the repository
git clone https://github.com/YOUR_USERNAME/adeshlang.git
cd adeshlang
# Create a branch
git checkout -b feature/your-feature-name
# Make your changes
# ... edit code ...
# Build and test
cargo build
cargo test
# Commit your changes
git commit -m "Add your feature description"
git push origin feature/your-feature-name
# Open a Pull Request on GitHub
Code Standards
Quality requirements:
- ✅ Zero compiler warnings
- ✅ Zero clippy warnings
- ✅ All tests must pass
- ✅ Code formatted with
cargo fmt - ✅ New features include tests
- ✅ Update documentation as needed
Running checks:
# Format code
cargo fmt --all
# Run linter
cargo clippy --all-targets -- -D warnings
# Run tests
cargo test
# Verify build
cargo build --release
4. Documentation Improvements
Help make AdeshLang more accessible:
- 📝 Fix typos and clarify explanations
- 📖 Add new examples
- 🎨 Improve formatting and structure
- 🌐 Translate to other languages
Documentation files:
- Language docs:
docs-website/docs/ - Project docs:
*.mdfiles in root - Examples:
examples/directory
5. Examples & Tutorials
Create examples demonstrating AdeshLang features:
Guidelines:
- 📌 Clear, descriptive names
- 💡 Comment key concepts
- ✅ Ensure it compiles and runs
- 📝 Include brief description at top
Example template:
// examples/category/feature_demo.adesh
// Description: Demonstrates [feature name] usage
// Usage: adesh run examples/category/feature_demo.adesh
// Related: docs/language-guide/feature.md
fn main() {
// Your example code here
}
6. Testing
Improve test coverage:
- 🧪 Add unit tests for new features
- 🔬 Add integration tests
- 🎯 Add edge case tests
- ⚡ Add performance benchmarks
Test locations:
- Unit tests: In source files (
#[cfg(test)]modules) - Integration tests:
tests/directory - Examples:
examples/directory
Development Setup
Prerequisites
Required:
- Rust 1.70+ (install)
- Cargo (comes with Rust)
- Git
Optional (for GPU backend):
- LLVM/MLIR tools
- CUDA Toolkit (NVIDIA) or ROCm (AMD)
- Vulkan SDK
Building from Source
# Clone repository
git clone https://github.com/adeshlang/adeshlang.git
cd adeshlang
# Debug build (faster compilation, slower runtime)
cargo build
# Release build (slower compilation, faster runtime)
cargo build --release
# Run tests
cargo test
# Run specific test
cargo test test_name
# Run with output
cargo test -- --nocapture
IDE Setup
VS Code:
- Install Rust Analyzer extension
- Install AdeshLang extension (if available)
- Open project folder
Other editors:
- See Tools Guide for LSP setup
Contribution Areas
Priority Areas (High Impact)
🔥 Urgent needs:
- Performance optimizations
- Bug fixes in core compiler
- GPU backend improvements
- Documentation enhancements
- Real-world examples
Medium Priority
📋 Important but not urgent:
- New language features
- Standard library additions
- Tooling improvements
- CI/CD automation
Nice to Have
✨ Bonus contributions:
- Additional examples
- Blog posts and tutorials
- Community outreach
- Logo/branding improvements
Pull Request Process
Before Submitting
Checklist:
- ✅ Code compiles without warnings
- ✅ All tests pass