2.4 KiB
2.4 KiB
| layout | published | noToc | noComments | noDate | title | subtitle | description | permalink | lang | tags | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| page | true | false | false | false | Contributing to Fun | How to contribute, project structure, coding style, running tests, and PR guidelines. | How to contribute, project structure, coding style, running tests, and PR guidelines. | /documentation/contributing/ | en |
|
Thanks for your interest in contributing! This guide covers the basics to get you productive quickly.
Getting started
- Clone the repo and build (see ../build/).
- Run tests locally (see ../testing/).
- Explore examples (see ../examples/).
Project structure
src/- C core, VM, and opcode implementations (https://git.xw3.org/fun/fun/src/branch/main/src/{:class="git"}).lib/- Standard library written in Fun.web/- Website and documentation (https://git.xw3.org/fun/fun/src/branch/main/web/{:class="git"}).examples/- Example programs and showcases.spec/- Language specification drafts.cmake/- CMake configuration and modules.scripts/- Utility scripts for development.make- Helper script for building (wraps CMake).
Code style
- C: C99, two-space indent, no tabs. Keep functions short and focused.
- Fun: two-space indent, snake_case for functions, PascalCase for classes/constructors.
- Prefer clear names over abbreviations. See ../style-guide/.
Development workflow
- Create a small, focused branch.
- Add/adjust tests for behavior changes (see ../writing-tests).
- Update docs if user-visible behavior changes.
- Submit a PR with a clear description and rationale.
Commit/PR guidelines
- Keep commits atomic; include test updates with the change.
- Reference related issues.
- Include benchmarks only when meaningful and reproducible.
Reporting bugs
Please include:
- Reproducer script (minimal), expected vs. actual behavior
- Build options and platform
fun --versionoutput
Code of Conduct
Be respectful and inclusive. See https://git.xw3.org/fun/fun/src/branch/main/CODE_OF_CONDUCT.md{:class="git"} in the repository root.