| Crates.io | scrape-core |
| lib.rs | scrape-core |
| version | 0.2.0 |
| created_at | 2026-01-16 04:11:20.580969+00 |
| updated_at | 2026-01-20 01:47:17.418228+00 |
| description | High-performance HTML parsing library core |
| homepage | |
| repository | https://github.com/bug-ops/scrape-rs |
| max_upload_size | |
| id | 2047840 |
| size | 367,237 |
High-performance HTML parsing library core. Pure Rust implementation with no FFI dependencies.
[dependencies]
scrape-core = "0.2"
Or with cargo:
cargo add scrape-core
[!IMPORTANT] Requires Rust 1.88 or later.
use scrape_core::Soup;
let html = r#"
<html>
<body>
<div class="content">Hello, World!</div>
<div class="content">Another div</div>
</body>
</html>
"#;
let soup = Soup::new(html);
// Find first element by tag
if let Some(div) = soup.find("div") {
println!("Text: {}", div.text());
}
// CSS selectors
for el in soup.select("div.content") {
println!("{}", el.inner_html());
}
Enable optional features in Cargo.toml:
[dependencies]
scrape-core = { version = "0.2", features = ["simd", "parallel"] }
| Feature | Description | Default |
|---|---|---|
simd |
SIMD-accelerated byte scanning (SSE4.2, AVX2, NEON, WASM SIMD128) | No |
parallel |
Parallel batch processing via Rayon | No |
[!TIP] Start with default features for fastest compile times. Add
simdfor production workloads.
v0.2.0 includes significant performance improvements:
parallel feature is enabled (near-linear scaling)Benchmarks show 10x faster parsing and up to 132x faster queries compared to BeautifulSoup. See full benchmark results in the main project README.
v0.2.0 introduces compile-time safety via the typestate pattern:
All safety guarantees are verified at compile time with zero performance impact.
scrape-core/
├── dom/ # Arena-based DOM representation
├── parser/ # html5ever integration
├── query/ # CSS selector engine
├── simd/ # Platform-specific SIMD acceleration
└── parallel/ # Rayon-based parallelization
The parsing and selector engine is powered by battle-tested libraries from the Servo browser engine:
Minimum Supported Rust Version: 1.88. MSRV increases are minor version bumps.
This crate is part of fast-scrape:
| Platform | Package |
|---|---|
| Python | fast-scrape |
| Node.js | @fast-scrape/node |
| WASM | @fast-scrape/wasm |
Licensed under either of Apache License, Version 2.0 or MIT License at your option.