📈 GH Trending Explorer 🎲 Surprise me

← all repos

context-dot-dev / rusteerio

git clone https://github.com/context-dot-dev/rusteerio.git

Cheerio-compatible HTML/XML processing powered by Rust, with configurable parallel extraction. Built by context.dev.

—
stars, 24h
+36
stars, 7 days · #1,164
+36
stars, 30 days · #7,867
36
★ total · +36% this week
0
forks · 0 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageTypeScript
LicenseMIT
Created2026-10-16 (4d ago)
Last push4d ago
Watchers0
OwnerOrganization

GitHub topics

Links

README excerpt
rusteerio 
 Cheerio's API on a Rust engine, with parallel workers and zero npm dependencies. 
**Heavily inspired by Cheerio** and its familiar,
flexible HTML API. Built by the **context.dev team**.
Cheerio's interface, a Rust HTML/XML engine, and configurable parallel workers.
Rusteerio keeps the DOM, parsing, selectors, mutations and serialization in a
native addon, with **zero npm runtime dependencies**. TypeScript supplies the
API, stable node views, user callbacks and Node.js I/O.
## Why this exists
Cheerio makes server-side HTML processing approachable. We wanted to keep that
experience while making large scraping and extraction workloads faster and
giving applications a way to move CPU work off the JavaScript main thread.
Rusteerio combines a familiar synchronous API with additional async batch APIs.
Use the synchronous API for ordinary document work, or set a worker limit when
processing many documents. The implementation is independent of Cheerio's
JavaScript engine; Cheerio is a development dependency used to check behavior.
## Installation
The npm package name is **`rusteerio`**:
 [code] 
Node.js **20.19 or newer** is required. Release tarballs bundle native binaries
for macOS arm64/x64, Linux glibc and musl arm64/x64, and Windows arm64/x64. Supported
platforms need no Rust installation and no install script. For a source checkout,
follow Development.
Linux GNU binaries require **glibc 2.28 or newer**. Musl binaries are tested on
**Alpine 3.24**. Linux also needs `libgcc_s.so.1`; minimal Alpine images can
install it with `apk add --no-cache libgcc`.
## Familiar Cheerio API
 [code] 
CommonJS works too:
 [code] 
The API includes selectors and traversal, DOM insertion and removal, cloning,
attributes and properties, classes, styles, form values and serialization,
HTML/XML output, extraction, buffers, streams and URL loading. The
`rusteerio/slim` and `rusteerio/utils` entry points are included. TypeScript
declarations are self-contained, with ESM and CommonJS support.
XML parsing preserves case and supports CDATA:
 [code] 
## Parallel extraction and worker limits
 [code] 
| API | Result | Native work |
| --- | --- | --- |
| `loadAsync(content, options?, isDocument?)` | `Promise ` | Parses off-thread |
| `loadAll(strings, options?, isDocument?)` | `Promise ` | Parses documents in parallel |
| `extractAll(strings, map, options?)` | Extracted objects in input order | Parses and extracts in parallel |
`configureWorkers({ threads: 4 })` (or `configureWorkers(4)`) caps active native
CPU work across concurrent batches, single-document async parsing and streams.
Set it before starting asynchronous native work. You can also set
`RUSTEERIO_THREADS=4` before starting Node. The default is available CPUs, capped
at 256. Configuration accepts integers from **1 to 256**; changing the budget
after work starts throws. Reapplying the same budget is allowed.
The per-batch `threads` option can lower a batch's parallelism within that shared
budget. Results pres