Thank you for your interest in contributing to JtV! This document provides guidelines and information for contributors.
Be respectful, constructive, and professional. We’re building something important together. See CODE_OF_CONDUCT.adoc for complete details.
Before submitting, check if the issue already exists in GitHub Issues.
When submitting a bug report, include:
-
JtV version (
jtv --version) -
Operating system
-
Minimal code example that reproduces the bug
-
Expected vs actual behavior
-
Error messages (full stack trace)
Before suggesting, check:
-
Is this a v1 or v2 feature? (See
docs/GRAMMAR_EVOLUTION.md) -
Has someone else suggested it?
-
Does it align with JtV’s core mission?
When suggesting, provide:
-
Clear use case
-
Example syntax
-
How it preserves security guarantees
Getting Started:
# Fork the repo
git clone https://github.com/YOUR_USERNAME/jtv
cd jtv
# Install dependencies
just install
# Run tests
just test
# Make your changes
git checkout -b feature/my-awesome-feature
# Commit with clear messages
git commit -m "Add feature: Brief description"
# Push and create PR
git push origin feature/my-awesome-feature-
wasm-pack (for WASM builds)
-
Lean 4 (for formal proofs, v2)
-
Node.js (for playground, future)
jtv/
├── packages/
│ ├── jtzig/ # Core Rust implementation
│ ├── jtv-analyzer/ # TypeScript code analyzer
│ └── jtv-safe/ # Smart contract compiler (future)
├── examples/ # Example programs
├── tools/
│ ├── cli/ # Command-line tool
│ ├── vscode-extension/# VS Code support
│ └── lsp/ # Language server (future)
├── docs/ # Documentation
└── shared/ # Shared resources (grammar, types)-
Format:
cargo fmt -
Lint:
cargo clippy — -D warnings -
Tests: Every PR must include tests
-
Documentation: Public APIs must have doc comments
Example:
/// Parses a JtV program from source code.
///
/// # Arguments
/// * `input` - Source code string
///
/// # Returns
/// * `Ok(Program)` - Parsed AST
/// * `Err(JtvError)` - Parse error with details
///
/// # Example
/// ```rust
/// let program = parse_program("x = 5 + 3")?;
/// ```
pub fn parse_program(input: &str) -> Result<Program> {
// ...
}-
Format:
deno fmt -
Lint:
deno lint -
Type annotations: Always use explicit types
-
Tests:
deno test
Test individual functions in isolation:
#[test]
fn test_parse_addition() {
let code = "x = 5 + 3";
let result = parse_program(code);
assert!(result.is_ok());
}Test complete workflows:
#[test]
fn test_fibonacci_execution() {
let code = r#"
fn fibonacci(n: Int): Int { ... }
result = fibonacci(10)
"#;
let program = parse_program(code).unwrap();
let mut interpreter = Interpreter::new();
interpreter.run(&program).unwrap();
let result = interpreter.get_variable("result").unwrap();
assert_eq!(result, Value::Int(55));
}-
When: Non-obvious logic, algorithms, security properties
-
Format: Clear, concise, no redundancy
-
Example:
// Use Babylonian method for fast integer square root
// Guaranteed to converge in log(n) iterations
fn sqrt(n: Int) -> Int { ... }Required for all public APIs:
/// Brief one-line description.
///
/// Longer explanation if needed.
///
/// # Arguments
/// * `param1` - Description
///
/// # Returns
/// Description of return value
///
/// # Errors
/// When and why errors occur
///
/// # Examples
/// ```
/// // Working code example
/// ```
pub fn function_name(...) { ... }-
❏ Code compiles without warnings
-
❏ All tests pass (
just test) -
❏ Code is formatted (
just fmt) -
❏ Linter passes (
just lint) -
❏ New code has tests
-
❏ Documentation updated
## Summary
Brief description of changes
## Motivation
Why is this change needed?
## Changes
- Bullet list of modifications
- Be specific
## Testing
How was this tested?
## Breaking Changes
Any backward-incompatible changes?
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Changelog entry (if applicable)We especially welcome contributions in these areas:
-
WASM code generation - Core functionality
-
Benchmarking - Validate performance claims
-
Error messages - Improve user experience
-
Examples - More real-world use cases
-
LSP server - Editor support
-
Standard library - More utilities
-
Documentation - Tutorials, guides
-
Tooling - Debugger, formatter
| GitHub Issues |
Bug reports, feature requests |
| GitHub Discussions |
General questions, ideas |
| Pull Requests |
Code contributions |
|
For sensitive issues |
Contributors are recognized in:
-
CONTRIBUTORS.md(alphabetical) -
Release notes (for significant contributions)
-
Project documentation (for major features)
By contributing, you agree that your contributions will be licensed under the same tri-licensing terms as the project:
SPDX-License-Identifier: CC-BY-SA-4.0See LICENSE.txt for details.
The name "JtV" and the JtV logo are trademarks of the JtV project. When using these marks:
-
You may use them to refer to the project
-
You may use them in documentation and educational materials
-
You must not imply official endorsement without permission
-
You must not modify or distort the marks