Skip to main content

resopt/
lib.rs

1//! Resource discovery and recoverable, pixel-verified optimization plans.
2//!
3//! The first backend recompresses static catalog PNGs without changing their
4//! filenames, decoded samples, or non-IDAT chunks. Plans measure source bytes,
5//! not compiled catalog or App Store download sizes.
6
7#![cfg_attr(feature = "native", doc = include_str!("../README.md"))]
8
9#[cfg(feature = "native")]
10mod analysis;
11#[cfg(feature = "native")]
12mod catalog;
13#[cfg(feature = "native")]
14mod filesystem;
15mod image_backend;
16mod optimizer;
17#[cfg(feature = "native")]
18mod plan;
19mod png_pixels;
20mod quality;
21#[cfg(feature = "native")]
22mod references;
23#[cfg(feature = "native")]
24mod report;
25#[cfg(feature = "native")]
26mod review;
27#[cfg(feature = "native")]
28mod server;
29#[cfg(feature = "native")]
30pub use server::serve;
31#[cfg(feature = "native")]
32mod resources;
33#[cfg(feature = "native")]
34mod scan_options;
35#[cfg(feature = "native")]
36pub use analysis::{
37    AnalysisOptions, AnalysisReport, ImageCandidate, ResourceAnalysis, analyze,
38    analyze_with_progress,
39};
40pub use image_backend::{
41    DEFAULT_MAX_PIXELS, ImageDifference, ImageInfo, MAX_PIXELS_LIMIT, image_backend_available,
42};
43#[cfg(feature = "native")]
44pub use report::refresh_report;
45#[cfg(feature = "native")]
46pub use resources::{Resource, ResourceInventory, inventory, inventory_with_options};
47#[cfg(feature = "native")]
48pub use scan_options::ScanOptions;
49
50#[cfg(feature = "native")]
51pub use catalog::{Asset, Inventory, scan, scan_with_options};
52pub use optimizer::Policy;
53#[cfg(feature = "native")]
54pub use plan::{ApplyReport, Candidate, Plan, apply, create_plan, read_plan, restore};
55
56/// Platform-independent, in-memory PNG optimization and image scoring.
57pub mod portable;
58
59#[cfg(feature = "native")]
60mod web;
61#[cfg(feature = "native")]
62pub use web::{WebOptions, web};