Skip to main content

ass_renderer/
lib.rs

1//! ASS subtitle renderer with modular backend support
2//!
3//! `ass-renderer` provides high-performance subtitle rendering with a CPU
4//! software backend and an optional `wgpu`-based hybrid GPU compositor that
5//! reuses the software backend's rasterized tiles.
6
7#![cfg_attr(feature = "nostd", no_std)]
8#![deny(unsafe_code)] // Changed from forbid to allow overrides in FFI modules
9#![warn(missing_docs)]
10#![allow(missing_docs)] // Allow missing docs for struct fields to reduce noise
11#![allow(dead_code)] // Allow dead code for work-in-progress features
12#![allow(unused_variables)] // Allow unused variables in development code
13
14#[cfg(feature = "nostd")]
15extern crate alloc;
16
17pub mod animation;
18pub mod backends;
19pub mod cache;
20pub mod collision;
21#[cfg(not(feature = "nostd"))]
22/// Debug and analysis tools for subtitle rendering
23pub mod debug;
24pub mod layout;
25pub mod pipeline;
26pub mod plugin;
27pub mod renderer;
28pub mod utils;
29
30pub use backends::{BackendType, RenderBackend};
31#[cfg(not(feature = "nostd"))]
32pub use debug::{DebugPlayer, FrameAnalyzer, FrameInspector, PlayerFrame};
33pub use pipeline::{Pipeline, PipelineStage};
34pub use plugin::{EffectPlugin, PluginRegistry};
35pub use renderer::{Frame, RenderContext, Renderer};
36pub use utils::RenderError;
37
38#[cfg(feature = "backend-metrics")]
39pub use backends::BackendMetrics;
40
41#[cfg(feature = "analysis-integration")]
42pub use ass_core::analysis::styles::ResolvedStyle;
43pub use ass_core::parser::ast::EventType;
44/// Re-export commonly used types from ass-core
45pub use ass_core::parser::{Event, Script, Section, Style};
46
47/// Library version
48pub const VERSION: &str = env!("CARGO_PKG_VERSION");