> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Rust configuration > Configuration options for the Fern Rust SDK. You can customize the behavior of the Rust SDK generator in `generators.yml`: **`generators.yml`** ```yaml {6-15} title="generators.yml" groups: rust-sdk: generators: - name: fern-rust-sdk version: 0.47.8 config: clientClassName: YourClientName crateName: your-crate-name crateVersion: "1.0.0" dateTimeType: "offset" environmentEnumName: YourEnvironment enableWireTests: true ``` **`clientClassName`** `string` The name of the generated client struct. This allows you to customize the struct name that users will instantiate when using your SDK. --- **`crateName`** `string` The name of the generated Rust crate. This is used in `Cargo.toml` and determines how users will add your SDK as a dependency. --- **`crateVersion`** `string` The version of the generated crate. This is used in `Cargo.toml` for publishing to crates.io. --- **`dateTimeType`** `'offset' | 'utc'` — default: offset Determines how timezone information is handled: * `offset`: Uses `DateTime` to preserve the original timezone from API responses * `utc`: Uses `DateTime` to normalize all datetimes to UTC regardless of their original timezone Both options accept any datetime format and assume UTC if no timezone is provided in the datetime string. --- **`environmentEnumName`** `string` The name of the generated environment enum. This allows you to customize the enum name that defines your API environments (such as production, staging, development). --- **`enableWebsockets`** `boolean` — default: false Enable generation of [WebSocket clients](/learn/sdks/deep-dives/websocket-clients) for APIs with WebSocket channels. --- **`enableWireTests`** `boolean` — default: false When enabled, generates [mock server (wire) tests](/learn/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec. --- **`generateExamples`** `boolean` — default: true When enabled, generates code examples in the README and reference documentation. --- **`maxRetries`** `number` The default number of retries for failed requests. When not set, the generated SDK defaults to 3 retries. SDK users can still override this per-request via request options. --- **`respectOptionalRequestBody`** `boolean` — default: false Lets callers omit the request body on endpoints with an optional request body. The method takes the body as an `Option`, and a call that passes `None` sends no body and no `Content-Type` header, instead of an empty JSON object (`{}`). Enable this when your API treats a missing body differently from an empty one. Only applies to request bodies declared as a single named type that the endpoint takes on its own. Required bodies, bodies folded into a request wrapper, and inlined request properties are unaffected. --- ### Package metadata Configure metadata for publishing to crates.io: **`generators.yml`** ```yaml title="generators.yml" config: packageDescription: "SDK for the Plant Store API" packageLicense: "MIT" packageRepository: "https://github.com/your-org/your-sdk" packageDocumentation: "https://docs.example.com" ``` **`packageDescription`** `string` A description of the crate for crates.io. This appears in the crate's metadata and search results. --- **`packageLicense`** `string` The license identifier for the crate (e.g., "MIT", "Apache-2.0"). --- **`packageLicenseFile`** `string` Path to a custom license file (e.g., `LICENSE.md`). When set, uses `license-file` instead of `license` in `Cargo.toml`. This is useful when your license isn't a standard Software Package Data Exchange (SPDX) identifier. --- **`packageRepository`** `string` The URL of the crate's source repository. --- **`packageDocumentation`** `string` The URL of the crate's documentation. --- ### Dependencies Add custom dependencies to your generated SDK: **`generators.yml`** ```yaml title="generators.yml" config: extraDependencies: tokio: "1.0" serde_json: "1.0" extraDevDependencies: mockall: "0.11" ``` **`extraDependencies`** `object` Additional dependencies to include in the generated `Cargo.toml`. Specify as a map of crate names to version requirements. You can also specify full dependency specifications with features and default features: **`generators.yml`** ```yaml title="generators.yml" config: extraDependencies: reqwest: version: "0.12" defaultFeatures: true ``` **`generators.yml`** ```yaml title="generators.yml" config: extraDependencies: reqwest: version: "0.12" features: ["rustls-tls"] ``` --- **`extraDevDependencies`** `object` Additional dev dependencies to include in the generated `Cargo.toml`. These are only used during development and testing. --- > Configuration options for the Fern Rust SDK.