Files
pezkuwi-subxt/substrate/srml
Tomasz Drwięga 20a3989785 Runtime logging. (#3821)
* Implement Printable for tuples.

* Add debugging function.

* Add debug 1.

* Implement  for everything.

* RuntimeDebug derive.

* Introduce RuntimeDebug.

* Add some dummy logging.

* Replace RuntimeDebug with Debug.

* Revert "Replace RuntimeDebug with Debug."

This reverts commit bc47070a8cb30241b2b590b2fa29fd195088162f.

* Working on Debug for all.

* Fix bounds.

* Add debug utils.

* Implement runtime logging.

* Add some docs and clean up.

* Clean up derives.

* Fix custom derive impl.

* Bump runtime.

* Fix long lines.

* Fix doc test.

* Use CARGO_CFG_STD.

* Revert "Use CARGO_CFG_STD."

This reverts commit ea429566de18ed0fa052571b359eb9826a64a9f4.

* Use parse_macro_input

* Update lockfile.

* Apply review suggestions.

* Remove stray re-export.

* Add no-std impl.

* Update lockfile.
2019-10-22 14:13:44 +02:00
..
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00
2019-10-22 14:13:44 +02:00

= SRML

The Substrate Runtime Module Library (SRML) is a collection of runtime modules.

== What are runtime modules?

A Substrate runtime can be composed of several smaller components for separation of concerns. These components are called runtime _modules_. Each runtime module packages together a set of functions (dispatchable extrinsic calls, public or private, mutable or immutable), storage items, and events.

There are four primary components that support runtime modules:

=== system module

https://github.com/paritytech/substrate/tree/master/srml/system[`system`] provides low-level APIs and utilities for other modules. https://github.com/paritytech/substrate/tree/master/srml/system[`system`] also defines all core types and extrinsic events for the Substrate runtime. *All modules depend on the system module.*

=== executive module

https://github.com/paritytech/substrate/tree/master/srml/executive[`executive`] dispatches incoming extrinsic calls to the respective modules in the runtime.

=== support macros

https://github.com/paritytech/substrate/tree/master/srml/support[`support` macros] are a collection of Rust macros to facilitate the implementation of common module components. https://github.com/paritytech/substrate/tree/master/srml/support[`support` macros] expand at runtime to generate types (e.g. `Module`, `Call`, `Store`, `Event`) which are thereafter used by the runtime to communicate with the modules. Common support macros include https://crates.parity.io/srml_support/macro.decl_module.html[`decl_module`], https://crates.parity.io/srml_support_procedural/macro.decl_storage.html[`decl_storage`], https://crates.parity.io/srml_support/macro.decl_event.html[`decl_event`], and https://crates.parity.io/srml_support/macro.ensure.html[`ensure`].

=== runtime

The runtime expands the support macros to get type and trait implementations for each module before calling https://github.com/paritytech/substrate/tree/master/srml/executive[`executive`] to dispatch calls to the individual modules. To see an example of how this might look, see https://github.com/paritytech/substrate/blob/master/node/runtime/src/lib.rs[`../node/runtime`].