Contributing¶
House rules¶
- Safe Rust in the front-end: the parser, resolver, type checker,
MIR, LLVM codegen, lints, and scheduler crates forbid
unsafe_code. The runtime, the Cranelift JIT, the stackful-coroutine layer, and the FFI binding surface contain contained, reviewedunsafe(C ABIs, executing generated code, context switching) - keep it in the smallest possible scope. cargo clippy --workspace --all-targets -- -D warningsis the gate.cargo fmt --all --checkmust pass.- One focused change per PR. No drive-by refactors.
The full style guide is in
GUIDELINES.md.
Getting oriented¶
- Start with the language spec for grammar and semantics.
- Each crate under
crates/has a module-level//!doc describing the compiler phase it belongs to. - Design notes live under
docs/(diagnostics style guide, runtime internals, self-hosting study).
Picking an issue¶
Streams ordered by impact, smallest to biggest:
- Landing a new lint in
gossamer-lint(the framework is in place; each lint is ~20 lines). - Wiring a new native stdlib module (see the
std::regexwrapper for the pattern). - Extending the diagnostics style guide with acceptance fixtures.
- Closing a security item in the roadmap.
- Implementing a major language feature (Cranelift codegen, scheduler, LSP capabilities beyond the shipped slice).
Running the tests¶
Per-crate:
Release benches:
Docs¶
Opens at http://localhost:8000/. Edit docs_src/*.md and save;
the site reloads.
Every ```gossamer fence under docs_src is checked by
crates/gossamer-cli/tests/docs_fences.rs and must be a program gos check
accepts. A fence that is a piece of a larger program the prose describes is
preceded by <!-- fragment -->; one that shows a rejected program is preceded
by <!-- compile_fail CODE --> and must fail with that diagnostic. Both
markers are HTML comments, so they do not render.
Stdlib pages are generated by gos doc --emit-stdlib docs_src/stdlib, which
also writes each module's item table from the manifest and the checker's
signatures; --check fails when a page drifts or a description names a
library path no module declares.