Contributing
This page is a short overview. The full guide lives in the repository.
Start with CONTRIBUTING.md
Section titled “Start with CONTRIBUTING.md”Read
CONTRIBUTING.md
in the repository first. It is the source of truth for how changes are accepted.
Get set up
Section titled “Get set up”- Build the compiler from source.
- Make sure the tests run before you change anything. See Running the tests.
The change loop
Section titled “The change loop”When you change behavior, run tests in this order:
- The smallest focused test for what you touched.
make test.make test-sanitize, for ownership, runtime, concurrency, FFI, or codegen changes.make test-bootstrap, for frontend, MIR, or compiler changes.
Because Beans is self-hosted, a compiler change has to keep building itself: the
stage2 and stage3 outputs must stay byte-identical (make test-bootstrap).
Code style basics
Section titled “Code style basics”Beans’ own code follows the language design rules. A few basics:
- Objects are made with
newon a class or a named static, never a free constructor function in a module. See the standard library. - Packages are
snake_case, one directory per package. See Local packages and imports. - There is no formatter yet, so match the style of the file you are editing.
See the release process for how changes ship.