In a nutshell

Version takes a form major.minor.patch. major is incremented for backwards incompatible changes, minor for new APIs and patch for bug fixes. If major is 0, minor may be incremented instead of major. Versions are compared as expected.

Formal definition

Nut versioning scheme is adopted from Semantic Versioning 2.0.0-rc.1 by Tom Preston-Werner, licensed under the Creative Commons Attribution 3.0 License.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

  1. Nut MUST declare and document a public API. It should be precise and comprehensive.
  2. Once a nut version has been published, the contents of that version MUST NOT be modified. Any modifications must be published as a new version.
  3. A version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers. X is the major version, Y is the minor version, and Z is the patch version. Each element MUST increase numerically by increments of one. For instance: 1.9.0 -> 1.10.0 -> 1.11.0.
  4. Patch version Z MUST be incremented if only backwards compatible bug fixes are introduced. A bug fix is defined as an internal change that fixes incorrect behavior. It MUST NOT change a public API.
  5. Minor version Y MUST be incremented if new, backwards compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated. It MAY be incremented if substantial new functionality or improvements are introduced within the private code. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented.
  6. Major version X MUST be incremented if any backwards incompatible changes are introduced to the public API. It MAY include minor and patch level changes. Patch and minor version MUST be reset to 0 when major version is incremented.
  7. Major version 0 is for initial development. It allows to increment minor version instead of major for backwards incompatible changes in public API.
  8. Precedence MUST be calculated by separating the version into major, minor and patch in that order. Major, minor, and patch versions are always compared numerically.