Split core types into a core subpackage
Closed this issue · 1 comments
Stebalien commented
Currently, the core Multihash
type and the Sum
function are defined in the same package. This means anyone who wants to import the type also needs to import the sum function, pulling in all the hashing libraries at the same time.
Instead, we should:
- Split the core types/functions into a
core
sub package. - Add type aliases in the root package to the types moved to the
core
package. - Keep
Sum
in the root package.
That way, packages that depend on these types can directly import the core
package, reducing binary size.
Replaces #78.