Skip to content

sgns::runtime::binaryen::Version

More...

#include <version.hpp>

Public Functions

Name
bool operator==(const Version & rhs) const
bool operator!=(const Version & rhs) const

Public Attributes

Name
std::string spec_name
std::string impl_name
uint32_t authoring_version
authoring_version is the version of the authorship interface
uint32_t spec_version
uint32_t impl_version
ApisVec apis
List of supported API "features" along with their versions.

Friends

Name
std::ostream & operator<<(std::ostream & out, const Version & v)

Detailed Description

struct sgns::runtime::binaryen::Version;

Runtime version. This should not be thought of as classic Semver (major/minor/tiny). This triplet have different semantics and mis-interpretation could cause problems. In particular: bug fixes should result in an increment of spec_version and possibly authoring_version, absolutely not impl_version since they change the semantics of the runtime.

Public Functions Documentation

function operator==

inline bool operator==(
    const Version & rhs
) const

function operator!=

inline bool operator!=(
    const Version & rhs
) const

Public Attributes Documentation

variable spec_name

std::string spec_name;

Identifies the different Substrate runtimes. There'll be at least supergenius and node.

variable impl_name

std::string impl_name;

Name of the implementation of the spec. This is of little consequence for the node and serves only to differentiate code of different implementation teams. For this codebase, it will be supergenius. If there were a non-Rust implementation of the SuperGenius runtime (e.g. C++), then it would identify itself with an accordingly different impl_name.

variable authoring_version

uint32_t authoring_version = 0u;

authoring_version is the version of the authorship interface

variable spec_version

uint32_t spec_version = 0u;

Version of the implementation of the specification. Nodes are free to ignore this; it serves only as an indication that the code is different; as long as the other two versions are the same then while the actual code may be different, it is nonetheless required to do the same thing. Non-verification-breaking optimizations are about the only changes that could be made which would result in only the impl_version changing. Version of the runtime specification. A full-node will not attempt to use its native runtime in substitute for the on-chain Wasm runtime unless all of spec_name, spec_version and authoring_version are the same between Wasm and native.

variable impl_version

uint32_t impl_version = 0u;

variable apis

ApisVec apis;

List of supported API "features" along with their versions.

Friends

friend operator<<

friend std::ostream & operator<<(
    std::ostream & out,

    const Version & v
);

Updated on 2026-03-04 at 13:10:43 -0800