Files
komorebi/CONTRIBUTING.md
T
LGUG2Z 9524b777b3 build(nix): build and check on Linux and macOS
The flake builds the workspace with crane and checks it the way `just check`
does, so that CI and a laptop run the same things: `komorebi-workspace-fmt`
(nightly rustfmt, since rustfmt.toml uses unstable options), `-clippy` with
warnings denied, `-doc` with rustdoc warnings denied, `-toml-fmt`, `-deny` and
`-nextest`. Treefmt and a pre-commit hook format Rust, Nix, TOML and the
justfile. `nix develop` gives a toolchain with the nightly rustfmt, cargo-deny,
nextest and udeps.

Linux is where komorebi runs, so only Linux gets packages and the overlay. An
Apple silicon Mac gets the dev shell, the formatter and the checks; the tests
there run against the fake desktop that arrives with the backend trait.
x86_64-darwin is left out because nixpkgs 26.11 dropped it, and the flake
follows the tip of nixpkgs-unstable.

The commit hash is a constant (`nix-check`) for the dependencies and for every
check, and the real one only goes into the final build. The version crate reads
it with `env!`, so putting it in the shared arguments would rebuild the
dependencies and rerun every check for each commit.

The README and CONTRIBUTING.md describe `nix develop` and `nix flake check`.
2026-10-27 09:17:51 -07:00

3.1 KiB

Contributing to the Project

The project is a collection of contributions from both the project leaders and community members. There are many ways to contribute, this can include content in the project repositories, as well as contributing in public and private conversation, assisting users, writing blog posts, and many other ways.

How contributions are made

Contributions to the project primarily happen in the project source repositories, but may also occur in other places, such as discussion forums and public and private discourse.

Contributing content to the Project

In order for the project leaders to manage sustained progress toward the project goals and maintain project velocity, focus and quality, the project may adjust the license terms over time.

Content contributed to the project must therefore be provided under sufficiently liberal terms to allow these operations to proceed unimpeded. As such contributions are accepted with the following understanding:

  • Contributed content is licensed under the terms of the 0-BSD license
  • Contributors accept the terms of the project license at the time of contribution

By making a contribution, you accept both the current project license terms, and that all contributions that you have made are provided under the terms of the 0-BSD license.

Working on the code

nix develop (or direnv, through the .envrc) provides the Rust toolchain, a nightly rustfmt and the tools the checks use. rustfmt.toml uses an unstable option, which is why the formatter is a nightly one.

just check runs everything a change has to pass before it is pushed: the formatting check, clippy with warnings denied, the tests, and rustdoc with warnings denied. just fmt formats the Rust sources, and nix fmt every file type the repository has. nix flake check is what CI runs; it builds the same checks, plus cargo deny, as derivations.

Commits

Commit messages follow the Conventional Commits specification: type(scope): description. The scope is the Rust module the change is in (wm, kwin, layouts), repo for repository files and markdown, nix for the flake and github for workflows. Every line of a message, the header included, is at most 80 columns, and the body says why the change is made.

Documentation lands in the commit that changes the behavior it describes, not in a later one.

Zero-Clause BSD

Permission to use, copy, modify, and/or distribute this software for  
any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL  
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES  
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE  
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY  
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN  
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT  
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.