End-to-end rasterization behind the render feature (which now enables obscura-render/paint): - obscura-render: screenshot_png(dom, viewport) paints and encodes to PNG via tiny-skia's encode_png (no extra dep). - obscura-browser: Page::screenshot renders the live DOM at a viewport. - CLI: obscura fetch --screenshot out.png writes the settled page to a PNG. - CDP: Page.captureScreenshot returns the PNG base64-encoded, so Puppeteer/Playwright page.screenshot() works. captureSnapshot still errors (it is a DOM/layer snapshot, not an image). Verified: both paths produce correct 1280x720 RGBA PNGs with elements laid out and colored as the CSS specifies (block stacking, backgrounds, white page). Default build unchanged; obstacle course 33/33. Text, borders, and images are not yet painted; the box layout and background colors are rendered.
34 lines
830 B
TOML
34 lines
830 B
TOML
[package]
|
|
name = "obscura-cli"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
|
|
[[bin]]
|
|
name = "obscura"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "obscura-worker"
|
|
path = "src/worker.rs"
|
|
|
|
[features]
|
|
default = []
|
|
stealth = ["obscura-browser/stealth", "obscura-net/stealth", "obscura-mcp/stealth"]
|
|
render = ["obscura-browser/render", "obscura-cdp/render"]
|
|
|
|
[dependencies]
|
|
obscura-browser = { workspace = true }
|
|
obscura-mcp = { workspace = true }
|
|
obscura-cdp = { workspace = true }
|
|
obscura-dom = { workspace = true }
|
|
obscura-net = { workspace = true }
|
|
obscura-js = { workspace = true }
|
|
tokio = { workspace = true }
|
|
clap = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
url = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|