Skip to content

Commit fed87aa

Browse files
committed
Update README add CONTRIBUTING
1 parent dbd3359 commit fed87aa

File tree

2 files changed

+79
-6
lines changed

2 files changed

+79
-6
lines changed

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing guide
2+
3+
## Style
4+
5+
We keep code clean and constantly refactoring it for better readability, maintainability, and performance.
6+
- It is totally fine and encouraged to refactor existing code and send PRs for that. Event if it is a small renaming or a typo fix.
7+
- Do not mix up refactoring with new features/bug fixes in a single PR.
8+
9+
## AI Generated Code
10+
11+
Of course you can use AI tools to _help_ you write code (who can ban you from that?) but in this case, please make sure to:
12+
- Manually review and test all AI-generated code before submitting it
13+
- State clearly in the PR description which parts of the code were generated by AI tools
14+
- Prefer small, focused AI-generated snippets over large chunks of code
15+
- Ensure that AI-generated code adheres to the project's coding style and guidelines
16+
17+
> [!WARNING]
18+
> If we find AI-generated code that is not reviewed or tested, we may ask you to remove it or even close the PR.
19+
20+
# General
21+
22+
## Dependencies
23+
24+
We prefer to keep dependencies to a minimum so we can control the code quality, build process, and security. Also, we know how slow a compilation can get with too many dependencies. Therefore, if you are thinking about adding a new dependency, please consider checking with the maintainers first.
25+
26+
## Branching Strategy
27+
28+
We use the `main` branch as the default branch and create tags for releases. For new features and bug fixes, please create feature branches from `main` and open pull requests against `main`.
29+
30+
Prior starting work on a PR, please ensure that you have an issue created for it and assinged to yourself. If a scope of work is less than existing issue, create a new issue and link it to the parent one.
31+
32+
## Branch Naming
33+
34+
Make branch names inherit the issue that it addresses. The pattern is: `<issue-number>-<type>-<short-description>`.
35+
36+
Examples:
37+
- If you work on a new _feature_ "9 - Develop Linker", name your branch `9-feature-develop-linker`.
38+
- If you work on a _bug fix_ "15 - Fix Parser Crash", name your branch `15-bug-fix-parser-crash`.
39+
40+
## Commit Messages
41+
42+
Please, do not use emoji in commit messages. Keep them simple and descriptive. Avoid tagging people `@` because in case of rebasing or playing with history it may lead to unwanted notifications.
43+
44+
## Clippy
45+
46+
We use `clippy` but sometimes it is too lound. In this case, it is ok to disable specific warnings.
47+
48+
# Code
49+
50+
## Tests
51+
52+
We tend to have as good test coverage as possible. At the same time we keep a balance between writing redundant test that can be make the codebase less readable and maintainable. Please keep in mind this balance when writing tests.
53+
54+
Every PR (except for documentation-only changes and renaming) must include tests that cover the changes made.
55+
56+
### Unit Tests
57+
58+
When writing unit tests, you probably need to have Inference source code as input. In this case, locate the code on top of the test with in a compact format. For example:
59+
60+
```rust
61+
```
62+
63+
### Code Generation Tests

β€ŽREADME.mdβ€Ž

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
[![Build](https://github.com/Inferara/inference/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Inferara/inference/actions/workflows/build.yml)
22

3-
# Inference
3+
# πŸŒ€ Inference Programming Language
44

5-
πŸŒ€ Inference programming language [specification](https://github.com/Inferara/inference-language-spec)
5+
Inference is a programming language designed for building verifiable software. It is featured with static typing, explicit semantics, and formal verification capabilities available out of the box.
6+
7+
> [!IMPORTANT]
8+
> The project is in early development. Internal design and implementation are subject to change. So please be patient with us as we build out the language and tools.
9+
10+
## Learn
11+
12+
- The [book](https://inference-lang.org/book)
13+
- Inference Programming Language [specification](https://github.com/Inferara/inference-language-spec)
614

715
## Inference Compiler CLI (`infc`)
816

917
`infc` drives the compilation pipeline for a single `.inf` source file. Phases are:
1018

1119
1. Parse (`--parse`) – build the typed AST.
1220
2. Analyze (`--analyze`) – perform semantic/type inference (WIP).
13-
3. Codegen (`--codegen`) – emit WebAssembly and optionally translate to V when `-o` is supplied.
21+
3. Codegen (`--codegen`) – emit WebAssembly and optionally translate to `.v` when `-o` is supplied.
1422

1523
You must specify at least one phase flag; requested phases run in canonical order.
1624

@@ -45,6 +53,8 @@ Artifacts are written to an `out/` directory relative to the working directory.
4553

4654
## Roadmap
4755

48-
* [Base type checker](https://github.com/Inferara/inference/issues/26)
49-
* Additional output formats.
50-
* [Linker](https://github.com/Inferara/inference/issues/9)
56+
Check out open [issues](https://github.com/Inferara/inference/issues).
57+
58+
## Contributing
59+
60+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

0 commit comments

Comments
Β (0)