Contributing to Day
Day™ is a young project. Its architecture is still moving, and the most useful contribution right now is a conversation, not a patch.
Start with a conversation
- For an idea, a question, or a design concern, open a thread in GitHub Discussions.
- For a bug, file a GitHub Issue with the target
platform, the Day version, and steps to reproduce — a failing
dayscriptfile is the best reproduction there is.
Please do not open a pull request without a discussion or issue that concluded a patch is wanted. A change that looks small on the surface often crosses nine backends, the docs, and the design record, and reviewing an unexpected patch costs more than talking the change through first. PRs without a linked conversation are likely to be closed with a pointer to this file.
Creating extensions and crates
You can publish an extension as an independent Cargo crate. Start with the extension model to choose how it integrates with Day:
- A part provides a capability without UI, such as device status or a system service. Its native implementations are platform-specific and do not depend on a UI toolkit.
- A piece provides reusable UI. A native piece supplies toolkit-specific renderers; a composite piece arranges existing pieces in Rust.
Use day new part <name> or day new piece <name> to scaffold the crate. Select the platforms
or toolkits you implement, then follow the part tutorial,
native-piece tutorial, or
composite-piece tutorial. Build and run the generated
examples or demo on each supported target, and document unsupported targets and required
permissions. Keep user-facing strings localized and access bundled resources through generated
resource constants.
Naming
Only crates whose source is hosted under the daybrite organization
(or forks of those repositories) should use the day- prefix. Other external projects should
use dayext-. This convention distinguishes project-hosted crates from independently maintained
extensions, including extensions hosted elsewhere on GitHub.
Use lowercase, hyphen-separated names that describe the feature:
| Extension | Naming pattern | Example |
|---|---|---|
| Platform-specific part | dayext-part-platform-feature | dayext-part-linux-power-profile |
| Toolkit-specific piece | dayext-piece-toolkit-feature | dayext-piece-gtk-source-editor |
| Part supporting multiple platforms | dayext-part-feature | dayext-part-power-profile |
| Piece supporting multiple toolkits, or a composite piece | dayext-piece-feature | dayext-piece-rating |
Replace platform with an OS name such as linux or android, and toolkit with a UI toolkit
such as gtk or appkit. Include that segment when the crate is specific to it; a shared API
with several native implementations can omit it. Other extension crates use dayext-feature.
These are naming examples, not a list of published crates.
For example, scaffold independent platform and toolkit extensions with:
day new part dayext-part-linux-power-profile --platforms linux
day new piece dayext-piece-gtk-source-editor --toolkits gtk
When a patch is agreed on
Dependency policy before Day 1.0
Daybrite-owned crates and apps use "0.*" for dependencies on Day and other Daybrite-owned
0.x crates. This includes internal framework dependencies and dependencies between external
parts and pieces. Keep path sources and workspace inheritance where needed; their version
requirement is still "0.*". Third-party dependencies keep their existing requirements.
Test-only path dependencies that must be stripped during publication omit the version field;
adding a version would publish their reverse edges and create dependency cycles.
We accept source and behavior changes between 0.x releases. A wildcard allows those releases
to resolve; it does not promise compatibility. Apps that need a fixed dependency set commit
Cargo.lock and build with --locked. Review and test lockfile updates before shipping.
Libraries cannot use their own lockfile to constrain a consuming app’s dependency graph.
Package versions remain concrete release numbers. A 0.x release bump must preserve the wildcard requirements. Revisit this policy when Day reaches 1.0.
Preparing the patch
Once a discussion lands on “yes, send a patch”:
- Reference the discussion or issue in the PR description.
- Build and run through the
dayCLI (day build,day launch), not barecargo. - To exercise your change in a real app (the showcase, or your own), build that app against
your checkout with
day patch --local— Developing Day and an app together covers the workflow. A framework feature usually lands with a Day-Showcase screen that demonstrates it, as a second PR that follows the framework change. - Before reporting work ready to commit or push, run
cargo fmt --allandbash scripts/ci/check-ready.shagainst all outstanding changes. This checks generated matrices, formatting, and host Clippy with test targets and warnings denied. Regenerate stale tables using theirscripts/ci/*-matrix.shgenerators, then rerun the gate. The checks accept correct uncommitted tables and never rewrite them. Runscripts/ci/lint.shfor the full available platform Clippy matrix andcargo testfor the crates you touched; report skipped platform checks when handing off work. Install the tracked hooks once per clone withbash scripts/install-hooks.sh: thepre-commithook formats, checks the generated matrices, and separately checks staged matrix inputs, so an unstaged correction cannot hide stale generated content in the commit. The hook skips host Clippy to keep commits fast, so it does not replacecheck-ready.sh. Builds and tests do not replace lint validation. - Update the documentation the change affects in the same PR: the relevant
docs/*.mdpage, and theDESIGN.mdsection that describes what you changed.
Documentation authoring
Follow the writing style guide, documentation conventions, authoring workflow and checks, and page templates. Use the existing shared glossary as the terminology source. Use the documentation maintenance checklist for review, freshness, platform-claim changes, and publication checks. Named documentation ownership remains deferred; record the reviewer and evidence for each change without assigning a permanent owner.
Platform support tiers
Every (OS, toolkit) target sits in a support tier, from Tier 1 (supported: thoroughly tested,
highest attention to quality) down to Tier 4 (development: compatibility combinations no app
ships on). The Platform support page defines
all four and says where each target stands today.
A tier records the maintenance a target has, not a verdict on the platform, so a target moves up when people show up to keep it there. Taking a platform up a tier means taking on the work that tier promises:
- an owner for the backend who reviews the patches that touch it;
- the showcase walkthrough run on real hardware before a release, not only in CI;
- triage for that platform’s bug reports, with reproductions the rest of us can run;
- its toolchain kept green in CI as SDKs, signing, and packaging move.
If you or your team can commit to that, open a Discussion naming the target and what you can cover. Tiers move down the same way: a target whose maintainer moves on, or whose CI leg stays red, drops until someone picks it up.
Contribution terms
By submitting a contribution to this repository — a pull request, a patch, or any other material intended for inclusion — you agree to the following:
- The contribution is your own work, or you otherwise have the right to submit it under these terms.
- Copyright in the contribution is transferred to The Daybrite Project upon submission.
- Your contribution is published under the project’s licenses (below), and the submission record is public and permanent.
A single copyright holder keeps the licensing of every file uniform and lets the project act on license questions for the work as a whole. If you cannot agree to the transfer, say so in the discussion before any code is written — do not open a PR.
Licenses
- Code is licensed under the Mozilla Public License 2.0 — see LICENSE.
- The documentation (
docs/) and the website (website/) are licensed under Creative Commons Attribution-ShareAlike 4.0 — see docs/LICENSE and website/LICENSE. - Source files carry a
Copyright © The Daybrite Projectline and anSPDX-License-Identifierheader naming the license that applies to them.