| Crates.io | scale-typegen |
| lib.rs | scale-typegen |
| version | 0.11.1 |
| created_at | 2023-11-10 16:47:00.950123+00 |
| updated_at | 2025-05-07 14:44:26.608402+00 |
| description | Type Generation for SCALE encoded Rust Types |
| homepage | |
| repository | https://github.com/paritytech/scale-typegen |
| max_upload_size | |
| id | 1031328 |
| size | 214,076 |
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:
scale_info::PortableRegistry containing the type information for the types that will be transpiled.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().