pub mod api;
pub mod cli;
pub mod config;
pub mod error;
#[cfg(feature = "cache")]
pub mod cache;
#[cfg(feature = "ocr")]
pub mod ocr;
#[cfg(feature = "math")]
pub mod math;
#[cfg(feature = "preprocess")]
pub mod preprocess;
pub mod output;
#[cfg(feature = "optimize")]
pub mod optimize;
#[cfg(all(target_arch = "wasm32", feature = "wasm"))]
pub mod wasm;
pub use api::{state::AppState, ApiServer};
pub use cli::{Cli, Commands};
pub use config::{
CacheConfig, Config, ModelConfig, OcrConfig, OutputConfig, PerformanceConfig, PreprocessConfig,
};
pub use error::{Result, ScipixError};
#[cfg(feature = "cache")]
pub use cache::CacheManager;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn default_config() -> Config {
Config::default()
}
pub fn high_accuracy_config() -> Config {
Config::high_accuracy()
}
pub fn high_speed_config() -> Config {
Config::high_speed()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version() {
assert!(!VERSION.is_empty());
}
#[test]
fn test_default_config() {
let config = default_config();
assert!(config.validate().is_ok());
}
#[test]
fn test_high_accuracy_config() {
let config = high_accuracy_config();
assert!(config.validate().is_ok());
}
#[test]
fn test_high_speed_config() {
let config = high_speed_config();
assert!(config.validate().is_ok());
}
}