luff 0.2.1

Print files with formatting
Documentation
//! WASM-compatible entry point for luff's formatting pipeline.
//!
//! This module provides a pure-Rust, no-I/O processor that accepts
//! in-memory file data and produces formatted output. It targets
//! `wasm32-unknown-unknown` and `wasm32-wasip1` but works on any platform.
//!
//! # Feature flags
//!
//! - `wasm`: Enables this module (pure Rust, no JS deps).
//! - `wasm-bindgen`: Adds `#[wasm_bindgen]` bindings for JavaScript callers.

mod error;
mod options;
mod processor;
pub(crate) mod render;
mod virtual_fs;

#[cfg(test)]
pub(crate) mod test_strategies;

// #[cfg(feature = "wasm-bindgen")]
// pub mod bindings;

pub use error::WasmError;
pub use options::{ProcessorOptions, ProcessorOptionsBuilder};
pub use processor::{ProcessResult, WasmProcessor};
pub use virtual_fs::VirtualFile;

// Re-export the canonical OutputFormat so WASM consumers don't need
// to reach into `crate::format` directly.
pub use crate::format::OutputFormat;

/// Convenience type alias for results from the WASM module.
pub type Result<T> = std::result::Result<T, WasmError>;