{
  "id": 6648002,
  "title": "Social cards in pure Rust: no headless Chrome",
  "url": "https://urgent.news/2026/09/10/social-cards-in-pure-rust-no-headless-chrome",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-10T21:26:54.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jorelfermin/social-cards-in-pure-rust-no-headless-chrome-2ok2"
  },
  "original_language": "en",
  "account": "Cloud Cost Analyzer (CCA) shares read-only scans as links on platforms like Slack, LinkedIn, and X. However, the links initially unfurl into a bare URL instead of a proper card displaying brand marks, savings, and findings. To solve this issue, Cloud Cost Analyzer implemented a user-agent-based dynamic rendering technique for social crawlers. When a crawler visits the link, it is redirected to a small server-rendered /embed page with Open Graph tags. This allows the crawler to read a fully-formed page with og:title, og:image, and other necessary metadata while human users continue to interact with the interactive dashboard.\n\nTo create the social cards, CCA built an SVG string and rasterized it in-process using pure Rust libraries, resvg and tiny-skia. This approach eliminates the need for a headless browser and the associated costs, such as shipping a browser alongside the service and keeping it patched. The renderer is about ten lines of code, with the layout being single-column and left-aligned for simplicity. The SVG references fonts using the CSS way, finding a family named exactly \"Space Grotesk\" and picking the closest weight within that family. A slight font issue was resolved by normalizing the font files' name tables, ensuring consistent rendering across different faces.",
  "summary": "Cloud Cost Analyzer (CCA) lets you share a read-only scan as a link. Someone drops that link in Slack or on LinkedIn, and instead of a bare URL I wanted it to unfurl into a proper card: the brand mark, the monthly savings we found, the number of findings. That was two separate problems. Figuring them out took me somewhere I didn't expect, because neither one wanted a headless browser, but both…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}