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
|`deleteFolderBeforeRendering`|`boolean`|`true`| Whether the base directory should be cleaned before generating new files. |
42
-
|`formatCode`|`boolean`|`false`| Whether we should use `cargo fmt` to format the generated code. When set to `true`, the `crateFolder` option must be provided. |
43
-
|`toolchain`|`string`|`"+stable"`| The toolchain to use when formatting the generated code. |
44
-
|`crateFolder`|`string`| none | The path to the root folder of the Rust crate. This option is required when `formatCode` is set to `true`. |
45
-
|`linkOverrides`|`Record<'accounts' \| 'definedTypes' \| 'instructions' \| 'pdas' \| 'programs' \| 'resolvers', Record<string, string>>`|`{}`| A object that overrides the import path of link nodes. For instance, `{ definedTypes: { counter: 'hooked' } }` uses the `hooked` folder to import any link node referring to the `counter` type. |
46
-
|`dependencyMap`|`Record<string, string>`|`{}`| A mapping between import aliases and their actual crate name or path in Rust. |
47
-
|`renderParentInstructions`|`boolean`|`false`| When using nested instructions, whether the parent instructions should also be rendered. When set to `false` (default), only the instruction leaves are being rendered. |
48
-
|`traitOptions`|[`TraitOptions`](#trait-options)|`DEFAULT_TRAIT_OPTIONS`| A set of options that can be used to configure how traits are rendered for every Rust types. See [documentation below](#trait-options) for more information. |
49
-
|`anchorTraits`|`boolean`|`true`| Whether to generate Anchor traits `impl` for account types. |
|`deleteFolderBeforeRendering`|`boolean`|`true`| Whether the base directory should be cleaned before generating new files. |
42
+
|`formatCode`|`boolean`|`false`| Whether we should use `cargo fmt` to format the generated code. When set to `true`, the `crateFolder` option must be provided. |
43
+
|`toolchain`|`string`|`"+stable"`| The toolchain to use when formatting the generated code. |
44
+
|`crateFolder`|`string`| none | The path to the root folder of the Rust crate. This option is required when `formatCode` is set to `true`. |
45
+
|`linkOverrides`|`Record<'accounts' \| 'definedTypes' \| 'instructions' \| 'pdas' \| 'programs' \| 'resolvers', Record<string, string>>`|`{}`| A object that overrides the import path of link nodes. For instance, `{ definedTypes: { counter: 'hooked' } }` uses the `hooked` folder to import any link node referring to the `counter` type. |
46
+
|`dependencyMap`|`Record<string, string>`|`{}`| A mapping between import aliases and their actual crate name or path in Rust. |
47
+
|`dependencyVersions`|`Record<string, CargoDependency>`|`{}`| A mapping between external crates — e.g. `solana-pubkey` — and the version range we should use for them — e.g. `^3.0` or the equivalent dependency object — e.g. `{ version: "^3.0" }`. The renderer offers default values for all external dependencies it relies on but this option may be used to override some of these values or add new ones. |
48
+
|`renderParentInstructions`|`boolean`|`false`| When using nested instructions, whether the parent instructions should also be rendered. When set to `false` (default), only the instruction leaves are being rendered. |
49
+
|`traitOptions`|[`TraitOptions`](#trait-options)|`DEFAULT_TRAIT_OPTIONS`| A set of options that can be used to configure how traits are rendered for every Rust types. See [documentation below](#trait-options) for more information. |
50
+
|`anchorTraits`|`boolean`|`true`| Whether to generate Anchor traits `impl` for account types. |
51
+
|`syncCargoToml`|`boolean`|`false`| Whether to update the dependencies of the existing `Cargo.toml` — or create a new `Cargo.toml` when missing — at the provided `crateFolder` option if provided. |
0 commit comments