ev/lib.rs
1#![feature(default_field_values)]
2//! `ev` — EV-invest's shared Rust libraries, one per Cargo feature.
3//!
4//! Each library is a self-contained module gated behind a feature flag, so a
5//! consumer pulls in only what it asks for and nothing else is compiled:
6//!
7//! ```toml
8//! ev = { git = "https://github.com/EV-invest/lib.git", default-features = false, features = ["architecture"] }
9//! ```
10//!
11//! # Available features
12//!
13//! - **`architecture`** — generic, I/O-free, `wasm32`-safe DDD tactical kernel
14//! (typed ids, entities, aggregate roots, repositories, gateways, the unit of
15//! work, domain events, specifications). See [`architecture`].
16//! - **`uikit`** — dep-light Dioxus UI kit (mirrors `@evinvest/uikit`). See [`uikit`].
17//! - **`analytics`** — PostHog product analytics (mirrors `@evinvest/analytics`):
18//! native async capture over `reqwest`; pure-Rust fetch on the Dioxus/wasm
19//! frontend. Does network I/O — opt-in, not the kernel. See [`analytics`].
20//! - **`error_monitoring`** — Sentry error monitoring (mirrors
21//! `@evinvest/error-monitoring`): native backend on the `sentry` crate; pure-Rust
22//! envelope POST + panic hook on the Dioxus/wasm frontend. See [`error_monitoring`].
23//! - **`experiments`** — frontend-only A/B testing (mirrors `@evinvest/experiments`):
24//! cookie-bucketed variant assignment; exposure is reported through an injected
25//! sink, so it never imports `analytics`. See [`experiments`].
26
27#![cfg_attr(docsrs, feature(doc_cfg))]
28
29#[cfg(feature = "architecture")]
30pub mod architecture;
31
32#[cfg(feature = "uikit")]
33pub mod uikit;
34
35#[cfg(feature = "analytics")]
36pub mod analytics;
37
38#[cfg(feature = "error_monitoring")]
39pub mod error_monitoring;
40
41#[cfg(feature = "experiments")]
42pub mod experiments;