windjammer 0.36.2

A simple language inspired by Go, Ruby, and Elixir that transpiles to Rust - 80% of Rust's power with 20% of the complexity
Documentation
# Contributing to Windjammer

Thank you for your interest in contributing to Windjammer! This document provides guidelines and instructions for contributing.

## ๐ŸŒŸ Ways to Contribute

There are many ways to contribute to Windjammer:

- ๐Ÿ› **Report bugs** - Help us identify and fix issues
- โœจ **Suggest features** - Share ideas for new functionality
- ๐Ÿ“š **Improve documentation** - Help others learn Windjammer
- ๐Ÿ’ป **Submit code** - Fix bugs or implement features
- ๐Ÿงช **Write tests** - Improve code coverage and reliability
- ๐Ÿ’ฌ **Help others** - Answer questions in discussions
- ๐ŸŽจ **Share examples** - Create tutorials and sample projects

## ๐Ÿ“‹ Before You Start

1. **Check existing issues** - Search for similar issues or feature requests
2. **Read the docs** - Familiarize yourself with Windjammer's philosophy and design
3. **Join discussions** - Engage with the community to discuss your ideas
4. **Start small** - Begin with small contributions to understand the codebase

## ๐Ÿ› Reporting Bugs

When reporting a bug, please include:

- **Clear title** - Summarize the issue concisely
- **Description** - Explain what happened and what you expected
- **Reproduction steps** - Provide a minimal example that reproduces the bug
- **Environment** - Include Windjammer version, OS, and any relevant details
- **Error messages** - Include full error output and stack traces

Use the [Bug Report template](.github/ISSUE_TEMPLATE/bug_report.yml) when creating an issue.

## โœจ Suggesting Features

When suggesting a feature:

- **Explain the problem** - What need does this feature address?
- **Propose a solution** - How should it work?
- **Consider alternatives** - What other approaches did you consider?
- **Show examples** - Provide code examples of how you'd use it
- **Align with philosophy** - Does it fit "80% of Rust's power, 20% of complexity"?

Use the [Feature Request template](.github/ISSUE_TEMPLATE/feature_request.yml) when creating an issue.

## ๐Ÿ’ป Development Setup

### Prerequisites

- Rust 1.70+ (install via [rustup]https://rustup.rs/)
- Git
- A code editor (VS Code with rust-analyzer recommended)

### Getting Started

1. **Fork the repository**
   ```bash
   # Click "Fork" on GitHub, then clone your fork
   git clone https://github.com/YOUR_USERNAME/windjammer.git
   cd windjammer
   ```

2. **Create a branch**
   ```bash
   git checkout -b feature/your-feature-name
   # or
   git checkout -b fix/your-bug-fix
   ```

3. **Build the project**
   ```bash
   cargo build
   ```

4. **Run tests**
   ```bash
   cargo test
   ```

5. **Install pre-commit hooks**
   ```bash
   git config core.hooksPath .git/hooks
   ln -sf ../../.githooks/pre-commit .git/hooks/pre-commit
   ```

## ๐Ÿงช Testing

- **Run all tests**: `cargo test`
- **Run specific test**: `cargo test test_name`
- **Run with output**: `cargo test -- --nocapture`
- **Run benchmarks**: `cargo bench`

Always add tests for new features and bug fixes.

## ๐Ÿ“ Code Style

- **Format code**: `cargo fmt --all`
- **Lint code**: `cargo clippy -- -D warnings`
- **Follow conventions**: Match the existing code style
- **Add comments**: Explain complex logic and design decisions
- **Write docs**: Add documentation for public APIs

## ๐Ÿ”„ Pull Request Process

1. **Update your branch**
   ```bash
   git fetch upstream
   git rebase upstream/main
   ```

2. **Make your changes**
   - Write clear, focused commits
   - Follow conventional commit format: `type: description`
   - Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`

3. **Test thoroughly**
   - Run all tests: `cargo test`
   - Run clippy: `cargo clippy`
   - Format code: `cargo fmt --all`

4. **Update documentation**
   - Update README.md if needed
   - Update CHANGELOG.md for user-facing changes
   - Add/update inline documentation

5. **Push and create PR**
   ```bash
   git push origin your-branch-name
   ```
   - Go to GitHub and create a pull request
   - Fill out the PR template completely
   - Link related issues

6. **Respond to feedback**
   - Address review comments promptly
   - Make requested changes
   - Ask questions if anything is unclear

## ๐Ÿ“ฆ Project Structure

```
windjammer/
โ”œโ”€โ”€ src/               # Core compiler source
โ”‚   โ”œโ”€โ”€ parser/        # Windjammer language parser
โ”‚   โ”œโ”€โ”€ analyzer/      # Semantic analysis and type checking
โ”‚   โ”œโ”€โ”€ codegen/       # Code generation (Rust, JS, WASM)
โ”‚   โ””โ”€โ”€ cli/           # Command-line interface
โ”œโ”€โ”€ std/               # Standard library (.wj files)
โ”œโ”€โ”€ crates/            # Sub-crates
โ”‚   โ”œโ”€โ”€ windjammer-lsp/      # Language Server Protocol
โ”‚   โ”œโ”€โ”€ windjammer-mcp/      # Model Context Protocol
โ”‚   โ””โ”€โ”€ windjammer-runtime/  # Runtime support
โ”œโ”€โ”€ examples/          # Example projects
โ”œโ”€โ”€ docs/              # Documentation
โ””โ”€โ”€ tests/             # Integration tests
```

## ๐ŸŽฏ Windjammer Philosophy

When contributing, keep in mind Windjammer's core philosophy:

- **80% of Rust's power, 20% of the complexity**
- **Zero backend leakage** - Developers write pure Windjammer
- **Inferred ownership** - No explicit `mut`, `&`, or lifetimes
- **Multi-target** - Compile to Rust, JavaScript, and WebAssembly
- **Pragmatic** - Favor practical solutions over theoretical purity

## ๐Ÿท๏ธ Commit Message Guidelines

Follow [Conventional Commits](https://www.conventionalcommits.org/):

```
type(scope): description

[optional body]

[optional footer]
```

**Types:**
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation changes
- `refactor`: Code refactoring
- `test`: Test additions or updates
- `chore`: Maintenance tasks
- `perf`: Performance improvements

**Examples:**
```
feat(parser): Add support for async/await syntax
fix(codegen): Correct ownership inference for builder patterns
docs(std): Update http module API documentation
```

## ๐Ÿ“œ License

By contributing to Windjammer, you agree that your contributions will be licensed under the same license as the project (MIT OR Apache-2.0).

## ๐Ÿค Code of Conduct

This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.

## ๐Ÿ’ฌ Getting Help

- **Discussions**: Ask questions in [GitHub Discussions]https://github.com/jeffreyfriedman/windjammer/discussions
- **Issues**: Report bugs or request features
- **Documentation**: Read the [official docs]docs/

## ๐Ÿ™ Thank You!

Your contributions make Windjammer better for everyone. We appreciate your time and effort!

---

**Questions?** Feel free to ask in [Discussions](https://github.com/jeffreyfriedman/windjammer/discussions) or open an issue.