cuenv_workspaces/parsers/mod.rs
1//! Parser implementations for converting package-manager lockfiles into `LockfileEntry` structs.
2//!
3//! Each parser implements the [`LockfileParser`](crate::LockfileParser) trait and focuses on a
4//! specific ecosystem. Feature flags allow opting into only the parsers you need so that binary
5//! size and compile time remain minimal.
6//!
7//! Parsers are available for JavaScript and Rust ecosystems today, and the module layout is
8//! intentionally extensible for additional package managers.
9//!
10//! ## Feature flags
11//!
12//! - `parsers-javascript`: Enables all JavaScript ecosystem parsers (npm, bun, pnpm, yarn)
13//! - `parsers-rust`: Enables all Rust ecosystem parsers (currently implies `parser-cargo`)
14//! - `parser-cargo`: Fine-grained feature for Cargo lockfile parsing (can be enabled on its own)
15//!
16//! **Note:** While fine-grained features like `parser-cargo` exist, it's recommended to use
17//! the aggregate features (`parsers-rust`, `parsers-javascript`) for simplicity unless you
18//! need to minimize dependencies for a specific parser.
19
20#[cfg(feature = "parsers-javascript")]
21pub mod javascript;
22#[cfg(any(feature = "parsers-rust", feature = "parser-cargo"))]
23pub mod rust;
24
25#[cfg(feature = "parsers-javascript")]
26pub use javascript::*;
27#[cfg(any(feature = "parsers-rust", feature = "parser-cargo"))]
28pub use rust::*;