Skip to main content

servo_fetch/
lib.rs

1//! Fetch, render, and extract web content with an embedded Servo browser engine.
2//! No Chrome, no containers, no external processes.
3//!
4//! ```no_run
5//! let md = servo_fetch::markdown("https://example.com")?;
6//! # Ok::<(), servo_fetch::Error>(())
7//! ```
8
9#![deny(unsafe_code)]
10
11pub mod engine;
12pub mod error;
13pub mod extract;
14pub mod layout;
15pub mod sanitize;
16
17pub(crate) mod bridge;
18pub(crate) mod crawl;
19pub(crate) mod net;
20pub(crate) mod pdf;
21pub(crate) mod runtime;
22pub(crate) mod screenshot;
23
24pub use engine::{
25    ConsoleLevel, ConsoleMessage, CrawlError, CrawlOptions, CrawlPage, CrawlResult, CrawlStatus, FetchOptions, Page,
26    crawl, crawl_each, extract_json, fetch, markdown, text, validate_url,
27};
28pub use error::{Error, Result};