Thank you for your interest in contributing to T-Ruby WASM! This document provides guidelines and information for contributors.
Please be respectful and constructive in all interactions. We welcome contributors of all backgrounds and experience levels.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/t-ruby-wasm.git cd t-ruby-wasm - Install dependencies:
npm install
- Create a branch for your changes:
git checkout -b feature/your-feature-name
- Use TypeScript for all source files
- Follow the existing code style
- Each file should have a single export
- Keep files under 100 lines (including comments)
- Write comprehensive JSDoc comments
We follow SOLID principles:
- Single Responsibility: Each class/module has one responsibility
- Open/Closed: Open for extension, closed for modification
- Liskov Substitution: Subtypes must be substitutable
- Interface Segregation: Keep interfaces small and focused
- Dependency Inversion: Depend on abstractions
Don't Repeat Yourself. Extract common logic into reusable utilities.
We use TDD methodology:
- Write a failing test first
- Write the minimum code to pass the test
- Refactor while keeping tests green
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage- Ensure all tests pass
- Update documentation if needed
- Add tests for new functionality
- Keep commits atomic and well-described
- Reference any related issues
type: short description
Longer description if needed.
Fixes #123
Types: feat, fix, docs, style, refactor, test, chore
t-ruby-wasm/
├── src/
│ ├── types/ # Type definitions (one per file)
│ ├── vm/ # Ruby VM related code
│ ├── utils/ # Utility functions
│ ├── TRuby.ts # Main TRuby class
│ ├── createTRuby.ts # Factory function
│ ├── VirtualFileSystem.ts
│ └── index.ts # Public exports
├── tests/ # Test files
├── scripts/ # Build scripts
└── dist/ # Build output
Feel free to open an issue for questions or discussions.