X posts rendered to PNG without a browser, in safe Rust and WebAssembly
open sourceApache-2.0self-hostablefree
xeet renders X (Twitter) posts to PNG images that match what Chrome shows on x.com, with the same line breaks, emoji, fallback fonts and "Show more" cut, without a headless browser. Instead of screenshotting, it reimplements what a post depends on in safe Rust: X's client rules (recorded with their evidence in its SPEC.md), Blink- and HarfBuzz-style text layout and bidi, the flexbox geometry around the text and Skia-style anti-aliasing. It ships as a WebAssembly module for browsers and Node (@xeet/core), native Rust crates and an xeet CLI, plus font packs loaded on first use, and renders a text post in a few milliseconds with no network, filesystem, clock or system fonts; native and WebAssembly builds give byte-identical output. A separate resolver turns an x.com link into a post while the caller supplies all network I/O. It handles quotes, cards, polls, video posters, CJK, RTL and the web and iOS differences, and its playground runs in the browser. Made by Guillermo Rauch.
Problems it solves
- generate an image of a tweet without running headless Chrome
- turn an x.com link into a PNG for a blog post or newsletter
- render X post screenshots in a serverless function where Chromium is too heavy
- make tweet images that look exactly like x.com, including emoji and line breaks
- render social post images deterministically so tests can compare bytes
- create tweet cards in the browser with WebAssembly
Features
- renders X posts to Retina PNGs matching Chrome on x.com
- no headless browser: text shaping, bidi, layout and rasterizing in safe Rust
- WebAssembly package for browsers and Node, native Rust crates and a CLI
- deterministic: byte-identical PNGs on Linux, macOS and WebAssembly
- resolver turns x.com links into posts with caller-supplied I/O
- quotes, cards, polls, media placeholders, video posters, CJK and RTL
- light and dark themes, web and iOS surfaces
- Show more detection and expanded renders
- sprite sheets of several widths and themes
- browser playground
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
