scale-typegen

Crates.ioscale-typegen
lib.rsscale-typegen
version0.12.0
created_at2023-11-10 16:47:00.950123+00
updated_at2025-11-18 13:27:47.779881+00
descriptionType Generation for SCALE encoded Rust Types
homepage
repositoryhttps://github.com/paritytech/scale-typegen
max_upload_size
id1031328
size215,246
Parity Crate Owner (parity-crate-owner)

documentation

README

scale-typegen

A library based on scale-info to transpile portable registries of types into rust type definitions. This library exposes a TypeGenerator struct which wants to be given two things:

  • a scale_info::PortableRegistry containing the type information for the types that will be transpiled.
  • a TypeGeneratorSettings defining how the code generation happens: What derives and attributes that are applied, substitutes for types, if docs should be generated as well, (..).

It exposes a generate_types_mod() function that creates an intermediate representation of a module (ModuleIR) that contains types and other modules. It can be directly converted to rust code via to_token_stream().

Commit count: 66

cargo fmt