You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust bindings for [litehtml](https://github.com/litehtml/litehtml) -- a lightweight HTML/CSS rendering engine.
4
6
5
7
## Crates
@@ -15,7 +17,8 @@ The `litehtml` crate has these feature flags:
15
17
16
18
-**`vendored`** (default) -- compile litehtml from bundled source. Disable to link against a system-installed litehtml (set `LITEHTML_DIR` or ensure headers/lib are on the search path).
17
19
-**`pixbuf`** -- CPU-based pixel buffer backend using `tiny-skia` and `cosmic-text`. Gives you `PixbufContainer` and `render_to_rgba()`.
-**`html`** -- General-purpose HTML utilities: encoding detection, sanitization, `data:`/`cid:` URI resolution, legacy attribute preprocessing, and a `prepare_html` pipeline.
21
+
-**`email`** -- Email-specific defaults on top of `html`: `EMAIL_MASTER_CSS` and a `prepare_email_html` convenience wrapper.
19
22
20
23
## Usage
21
24
@@ -45,7 +48,7 @@ With direnv (GUIX -- see `.envrc`):
45
48
46
49
```bash
47
50
direnv allow
48
-
cargo test --workspace --features 'litehtml/pixbuf,litehtml/email'
51
+
cargo test --workspace --features 'litehtml/pixbuf,litehtml/html'
Remote image fetching is off by default - tracking pixels are the norm in marketing email. Pass a `url_fetcher` closure to `prepare_email_html` to opt in with your own HTTP client.
Raw FFI bindings for [litehtml](https://github.com/litehtml/litehtml) — a lightweight C++ HTML/CSS rendering engine.
6
+
7
+
This crate provides auto-generated bindings via `bindgen` through a C wrapper (litehtml is C++). For a safe Rust API, use the [`litehtml`](https://crates.io/crates/litehtml) crate instead.
8
+
9
+
## Features
10
+
11
+
-**`vendored`** (default) — compile litehtml from bundled source
12
+
- Disable to link against a system-installed litehtml (set `LITEHTML_DIR` or ensure headers/lib are on the search path)
0 commit comments