# Rust quickstart

> Get started with the Fern Rust SDK.

Generate a Rust SDK by following the instructions on this page.

<Info>
  This page assumes that you have:

  * An initialized `fern` folder. See [Set up the `fern`
    folder](/sdks/overview/quickstart).
  * A GitHub repository for your SDK. See [Project Structure](/sdks/overview/project-structure).
</Info>

<Steps>
  ### Pass `fern check`

  Run `fern check` to ensure that your API definition is valid. If there are any errors,
  fix them before proceeding.

  <Note>
    If you're using an OpenAPI Specification, check out all of our
    [supported extensions](/learn/api-definition/openapi/extensions).
  </Note>

  <Step title="Add the SDK generator">
    Run the following command to add the Rust SDK generator to `generators.yml`:

    ```bash
    fern add fern-rust-sdk --group rust-sdk
    ```

    <Note>
      `rust-sdk` is the name of the `generators.yml` group that configures your Rust
      SDK's output location and other metadata. You can customize this group name to
      differentiate between multiple SDKs across different languages (e.g.,
      `python-sdk`, etc) in your organization.
    </Note>

    This command adds the following `group` to `generators.yml`:

    ```yaml title="generators.yml"
      rust-sdk: # group name
        generators:
          - name: fernapi/fern-rust-sdk
            version: 0.17.2
            output:
              location: local-file-system
              path: ../sdks/rust
    ```
  </Step>

  <Step title="Generate the SDK">
    Run the following command to generate your SDK:

    ```bash
    fern generate --group rust-sdk
    ```

    This creates a `sdks` folder in your current directory. The resulting folder structure looks like this:

    <Files>
      <Folder name="fern" comment="created by fern init" />

      <Folder name="sdks" defaultOpen comment="created by fern generate --group rust-sdk">
        <Folder name="rust" defaultOpen>
          <File name="Cargo.toml" />

          <File name="README.md" />

          <File name="reference.md" />

          <File name="rustfmt.toml" />

          <Folder name="src">
            <File name="client.rs" />

            <File name="config.rs" />

            <File name="error.rs" />

            <File name="lib.rs" />

            <File name="prelude.rs" />

            <Folder name="core">
              <File name="http_client.rs" />

              <File name="mod.rs" />

              <File name="pagination.rs" />

              <File name="query_parameter_builder.rs" />

              <File name="request_options.rs" />

              <File name="sse_stream.rs" />

              <File name="utils.rs" />
            </Folder>

            <Folder name="api">
              <File name="mod.rs" />

              <Folder name="types" />

              <Folder name="resources" />
            </Folder>
          </Folder>
        </Folder>
      </Folder>
    </Files>
  </Step>
</Steps>