//! The Substrate runtime api is the interface between the node and the runtime. There isn't a fixed
//! set of runtime apis, instead it is up to the user to declare and implement these runtime apis.
//! The declaration of a runtime api is normally done outside of a runtime, while the implementation
//! of it has to be done in the runtime. We provide the [`decl_runtime_apis!`] macro for declaring
//! a runtime api and the [`impl_runtime_apis!`] for implementing them. The macro docs provide more
//! It is required that each runtime implements at least the [`Core`] runtime api. This runtime api
//! supported to change function signatures or names in a non-breaking way. For more information on
//! All runtime apis and their versions are returned as part of the [`RuntimeVersion`]. This can be
//! For testing we provide the [`mock_impl_runtime_apis!`] macro that lets you implement a runtime
//! Substrate supports logging from the runtime in native and in wasm. For that purpose it provides
//! wasm blobs. This can be done by enabling the `disable-logging` feature of this crate. Be aware
//! that this feature instructs `log` and `tracing` to disable logging at compile time by setting
//! Each runtime api is declared as a trait with functions. When compiled to WASM, each implemented
//! defined in the trait. The return value is an `u64` that represents `length << 32 | pointer` of
//! an `u8` array. This return value `u8` array contains the SCALE encoded return value as defined
//! by the trait function. The macros take care to encode the parameters and to decode the return
/// Calls the given api function with the given encoded arguments at the given block and returns
/// Initialize the `extensions` for the given block `at` by using the global extensions factory.
pub const fn serialize_runtime_api_info(id: [u8; 8], version: u32) -> [u8; RUNTIME_API_INFO_SIZE] {
/// Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime.
sp_core::generate_feature_enabled_macro!(frame_metadata_enabled, feature = "frame-metadata", $);