Skip to navigation

Rust configuration

View as Markdown

Configure the Rust SDK in the generation block of its target in sdk-config.yml:

sdk-config.yml
targets:
- language: rust
generation:
naming:
clientName: YourClientName
dateTimeType: offset
capitalizeInitialisms: true

The target’s generation block also accepts the shared generation options, such as naming, wireTests, and customCode. Shared options set in the top-level generation block apply to every target, and a target’s generation block overrides them. For generators.yml options, see the Legacy Rust configuration.

Rust options

<ParamField path=“dateTimeType” type=""offset” | “utc"" required= toc=> Whether datetime values preserve their offset or normalize to UTC. </ParamField>

capitalizeInitialisms
boolean

Whether generated Rust names capitalize common initialisms.

features
object

Cargo features and the dependencies or features each enables.

defaultFeatures
list of string

Cargo features included in the crate default feature set.