ds-api 0.2.0

A Rust client library for the DeepSeek API with support for chat completions, streaming, and tools
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "ds-api"
version = "0.2.0"
authors = ["ozongzi <ozongzi@icloud.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A Rust client library for the DeepSeek API with support for chat completions, streaming, and tools"
readme = "README.md"
keywords = [
    "deepseek",
    "api",
    "ai",
    "chat",
    "llm",
]
categories = [
    "api-bindings",
    "web-programming",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/ozongzi/ds-api"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[package.metadata.ci]
github_actions = """
name: CI

on:
  push:
    branches: [ main, master ]
  pull_request:
    branches: [ main, master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust toolchain (stable)
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - name: Install rustfmt & clippy
        run: rustup component add rustfmt clippy

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

      - name: Cache cargo target
        uses: actions/cache@v4
        with:
          path: target
          key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}

      - name: Run cargo fmt check
        run: cargo fmt --all -- --check

      - name: Run cargo clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Run tests
        run: cargo test --workspace --all-features --verbose
"""

[lib]
name = "ds_api"
path = "src/lib.rs"

[[example]]
name = "comprehensive"
path = "examples/comprehensive.rs"

[[example]]
name = "hello_world"
path = "examples/hello_world.rs"

[[example]]
name = "json_response"
path = "examples/json_response.rs"

[[example]]
name = "request_response"
path = "examples/request_response.rs"

[[example]]
name = "simple_chatter_console"
path = "examples/simple_chatter_console.rs"

[dependencies.eventsource-stream]
version = "0.2.3"

[dependencies.futures]
version = "0.3.31"

[dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "stream",
]

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.thiserror]
version = "1.0"

[dependencies.tokio]
version = "1.49.0"
features = ["full"]

[dev-dependencies.tokio]
version = "1.49.0"
features = [
    "macros",
    "rt-multi-thread",
]

[dev-dependencies.wiremock]
version = "0.5"