You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library scale-type-resolver exists and defines a TypeResolver trait that can be imeplemented by anything capable of resolving some "id" to SCALE type information.
This library is used throughout the Rust crates (scale-encode, scale-decode, scale-value etc) such that they are all generic over how type information is provided, rather than depending explicitly on scale-info. One reason to be generic like this is that we want all crates requiring type information to be able to accept either scale-info (for V14+ types) or scale-info-legacy (for pre-V14 types) as a provider of this information.
Currently, scale-type-resolver has a feature flag to depend on scale-info and implement the trait for it. In other words, right now we have this:
I'd like to swap this around and have scale-info depend on scale-type-resolver and implement it. This way, all updates to scale-info implement scale_type_resolver::TypeResolver and are usable in conjunction with the other Rust crates which rely on it without them needing to be updated. In other words, I want us to have this:
Steps to achieve this:
Publish scale-type-resolver 1.0.0 to signify that it is stable and provides the necessary type information (this has been battle tested with our modern and historic decoding crates). In this release, remove the import of scale-info and implementation of it.
Have scale-info import scale-type-resolver and implement it (ie move the impl to scale-info). Put it behind a scale-type-resolver feature flag to make this optional.
New minor release of scale-info to publish this change.
Update rust crates to depend on scale-type-resolver 1.0.0 and pull in the appropriate version of scale-info where needed (ie in Subxt).
The text was updated successfully, but these errors were encountered:
The library
scale-type-resolver
exists and defines aTypeResolver
trait that can be imeplemented by anything capable of resolving some "id" to SCALE type information.This library is used throughout the Rust crates (
scale-encode
,scale-decode
,scale-value
etc) such that they are all generic over how type information is provided, rather than depending explicitly onscale-info
. One reason to be generic like this is that we want all crates requiring type information to be able to accept eitherscale-info
(for V14+ types) orscale-info-legacy
(for pre-V14 types) as a provider of this information.Currently,
scale-type-resolver
has a feature flag to depend onscale-info
and implement the trait for it. In other words, right now we have this:I'd like to swap this around and have
scale-info
depend onscale-type-resolver
and implement it. This way, all updates toscale-info
implementscale_type_resolver::TypeResolver
and are usable in conjunction with the other Rust crates which rely on it without them needing to be updated. In other words, I want us to have this:Steps to achieve this:
scale-type-resolver
1.0.0 to signify that it is stable and provides the necessary type information (this has been battle tested with our modern and historic decoding crates). In this release, remove the import ofscale-info
and implementation of it.scale-info
importscale-type-resolver
and implement it (ie move the impl toscale-info
). Put it behind ascale-type-resolver
feature flag to make this optional.scale-info
to publish this change.scale-type-resolver
1.0.0 and pull in the appropriate version ofscale-info
where needed (ie in Subxt).The text was updated successfully, but these errors were encountered: