{
  "slug": "sdk/rust",
  "title": "Rust SDK",
  "description": "Send Cuitty events from Rust with an async tokio-friendly client.",
  "url": "https://cuitty.com/docs/sdk/rust",
  "markdown_url": "https://cuitty.com/docs/sdk/rust.md",
  "json_url": "https://cuitty.com/docs/sdk/rust.json",
  "frontmatter": {
    "title": "Rust SDK",
    "description": "Send Cuitty events from Rust with an async tokio-friendly client.",
    "order": 4,
    "section": "SDK",
    "updatedAt": "2026-04-27"
  },
  "headings": [
    {
      "depth": 1,
      "slug": "rust-sdk",
      "text": "Rust SDK"
    },
    {
      "depth": 2,
      "slug": "planned-api",
      "text": "Planned API"
    },
    {
      "depth": 2,
      "slug": "live-performance-numbers",
      "text": "Live performance numbers"
    },
    {
      "depth": 2,
      "slug": "see-also",
      "text": "See also"
    }
  ],
  "body_markdown": "# Rust SDK\n\n> **Status: Preview.** The Rust SDK is on the Phase 3 roadmap.\n\n## Planned API\n\n```rust\nlet c = cuitty::Client::new(cuitty::Config {\n    portal_url,\n    project_id,\n    api_key,\n});\n\nc.audit(cuitty::AuditEvent {\n    actor:    \"alice@example.com\".into(),\n    action:   \"secret.rotate\".into(),\n    resource: \"stripe.live_key\".into(),\n}).await?;\n```\n\nUse the [wire protocol](/docs/reference/wire-protocol) and `reqwest` + `hmac` until the typed client lands.\n\n## Live performance numbers\n\nSee live benchmarks at [https://benchmarks.cuitty.com/sdks/rust](https://benchmarks.cuitty.com/sdks/rust).\n\n## See also\n\n- [Wire protocol](/docs/reference/wire-protocol)\n- [SDK parity & divergence](/docs/sdk/parity)",
  "body_html": "<h1 id=\"rust-sdk\">Rust SDK</h1>\n<blockquote>\n<p><strong>Status: Preview.</strong> The Rust SDK is on the Phase 3 roadmap.</p>\n</blockquote>\n<h2 id=\"planned-api\">Planned API</h2>\n<pre class=\"astro-code github-dark\" style=\"background-color:#24292e;color:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"rust\"><code><span class=\"line\"><span style=\"color:#F97583\">let</span><span style=\"color:#E1E4E8\"> c </span><span style=\"color:#F97583\">=</span><span style=\"color:#B392F0\"> cuitty</span><span style=\"color:#F97583\">::</span><span style=\"color:#B392F0\">Client</span><span style=\"color:#F97583\">::</span><span style=\"color:#B392F0\">new</span><span style=\"color:#E1E4E8\">(</span><span style=\"color:#B392F0\">cuitty</span><span style=\"color:#F97583\">::</span><span style=\"color:#B392F0\">Config</span><span style=\"color:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    portal_url,</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    project_id,</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    api_key,</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">});</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">c</span><span style=\"color:#F97583\">.</span><span style=\"color:#B392F0\">audit</span><span style=\"color:#E1E4E8\">(</span><span style=\"color:#B392F0\">cuitty</span><span style=\"color:#F97583\">::</span><span style=\"color:#B392F0\">AuditEvent</span><span style=\"color:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    actor</span><span style=\"color:#F97583\">:</span><span style=\"color:#9ECBFF\">    \"alice@example.com\"</span><span style=\"color:#F97583\">.</span><span style=\"color:#B392F0\">into</span><span style=\"color:#E1E4E8\">(),</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    action</span><span style=\"color:#F97583\">:</span><span style=\"color:#9ECBFF\">   \"secret.rotate\"</span><span style=\"color:#F97583\">.</span><span style=\"color:#B392F0\">into</span><span style=\"color:#E1E4E8\">(),</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">    resource</span><span style=\"color:#F97583\">:</span><span style=\"color:#9ECBFF\"> \"stripe.live_key\"</span><span style=\"color:#F97583\">.</span><span style=\"color:#B392F0\">into</span><span style=\"color:#E1E4E8\">(),</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">})</span><span style=\"color:#F97583\">.await?</span><span style=\"color:#E1E4E8\">;</span></span></code></pre>\n<p>Use the <a href=\"/docs/reference/wire-protocol\">wire protocol</a> and <code>reqwest</code> + <code>hmac</code> until the typed client lands.</p>\n<h2 id=\"live-performance-numbers\">Live performance numbers</h2>\n<p>See live benchmarks at <a href=\"https://benchmarks.cuitty.com/sdks/rust\">https://benchmarks.cuitty.com/sdks/rust</a>.</p>\n<h2 id=\"see-also\">See also</h2>\n<ul>\n<li><a href=\"/docs/reference/wire-protocol\">Wire protocol</a></li>\n<li><a href=\"/docs/sdk/parity\">SDK parity &#x26; divergence</a></li>\n</ul>",
  "links_out": [
    "/docs/reference/wire-protocol",
    "https://benchmarks.cuitty.com/sdks/rust",
    "/docs/sdk/parity"
  ]
}