Guidelines¶
This document describes the general project guidelines that apply to nova-coreand nova-drm.
Language¶
The Nova project uses the Rust programming language. In this context, all rulesof the Rust for Linux project as documented inGeneral Information apply. Additionally, the following rulesapply.
Unless technically necessary otherwise (e.g. uAPI), any driver code is writtenin Rust.
Unless technically necessary, unsafe Rust code must be avoided. In case oftechnical necessity, unsafe code should be isolated in a separate componentproviding a safe API for other driver code to use.
Style¶
All rules of the Rust for Linux project as documented inCoding Guidelines apply.
For a submit checklist, please also see theRust for Linux Submit checklistaddendum.
Documentation¶
The availability of proper documentation is essential in terms of scalability,accessibility for new contributors and maintainability of a project in general,but especially for a driver running as complex hardware as Nova is targeting.
Hence, adding documentation of any kind is very much encouraged by the project.
Besides that, there are some minimum requirements.
Every non-private structure needs at least a brief doc comment explaining thesemantical sense of the structure, as well as potential locking and lifetimerequirements. It is encouraged to have the same minimum documentation fornon-trivial private structures.
uAPIs must be fully documented with kernel-doc comments; additionally, thesemantical behavior must be explained including potential special or cornercases.
The APIs connecting the 1st level driver (nova-core) with 2nd level driversmust be fully documented. This includes doc comments, potential locking andlifetime requirements, as well as example code if applicable.
Abbreviations must be explained when introduced; terminology must be uniquelydefined.
Register addresses, layouts, shift values and masks must be defined properly;unless obvious, the semantical sense must be documented. This only applies ifthe author is able to obtain the corresponding information.
Acceptance Criteria¶
Patches must only be applied if reviewed by at least one other person on themailing list; this also applies for maintainers.