Skip to main content

API_VERSION

Constant API_VERSION 

Source
pub const API_VERSION: &str = "1.24";
Expand description

The protocol-compatibility version as "MAJOR.MINOR", distinct from the crate/stack version.

  • MAJOR matches the /N in API_NAME and changes only on a breaking wire change (the transport already rejects a mismatched api, so an equality check on that is redundant).

  • MINOR (API_MINOR) increments on a surface change within a major — additive fields, new methods, or a strictness change like params validation — bumped in the same change that makes it. A client can guard with api_minor >= N for a feature it needs, or refuse a daemon older than a minor it requires. It never resets except on a MAJOR bump.

    It also bumps for a change to what a field MEANS with no change to its shape — six of the twenty-four have, see API_MINOR’s history. “Every surface change” is what this line used to claim, and it was wrong in both directions: minor 9’s entry records surface changes that shipped WITHOUT a bump, and six bumps changed no type at all. Read the history, not the rule.