Expose instancing in metadata (#3188)

* Expose instancing in metadata

- Introduces metadata v7
- If a module is using instancing, the storage exposes the instance in
metadata
- Metadata module name is now the upper case one given to
`construct_runtime!`

* Remove obsolete macro

* Just expose one prefix

* Bump spec

* Fix prefix generation
This commit is contained in:
Bastian Köcher
2019-07-24 21:40:34 +02:00
committed by GitHub
parent 2b6f664caf
commit f7ff339ebd
11 changed files with 756 additions and 617 deletions
+12 -3
View File
@@ -576,7 +576,9 @@ macro_rules! __decl_runtime_metadata {
$runtime;
{
$( $parsed )*
$module $( < $module_instance > )? { $( $( $leading_module )* )? $( $modules )* }
$module $( < $module_instance > )? as $name {
$( $( $leading_module )* )? $( $modules )*
}
};
$( $rest )*
);
@@ -618,11 +620,18 @@ macro_rules! __decl_runtime_metadata {
// end of decl
(
$runtime:ident;
{ $( $parsed_modules:ident $( < $module_instance:ident > )? { $( $withs:ident )* } )* };
{
$(
$parsed_modules:ident $( < $module_instance:ident > )? as $parsed_name:ident {
$( $withs:ident )*
}
)*
};
) => {
$crate::impl_runtime_metadata!(
for $runtime with modules
$( $parsed_modules::Module $( < $module_instance > )? with $( $withs )* , )*
$( $parsed_modules::Module $( < $module_instance > )? as $parsed_name
with $( $withs )* , )*
);
}
}