Skip to content

Contributing

This page is a short overview. The full guide lives in the repository.

Read CONTRIBUTING.md in the repository first. It is the source of truth for how changes are accepted.

  1. Build the compiler from source.
  2. Make sure the tests run before you change anything. See Running the tests.

When you change behavior, run tests in this order:

  1. The smallest focused test for what you touched.
  2. make test.
  3. make test-sanitize, for ownership, runtime, concurrency, FFI, or codegen changes.
  4. 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).

Beans’ own code follows the language design rules. A few basics:

  • Objects are made with new on 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.