1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
[]
= "ev_lib"
= "0.17.1"
= "2024"
= "EV-invest shared Rust libraries, one per feature"
= "BlueOak-1.0.0"
= "https://github.com/EV-invest/lib"
[]
# The kit has one token vocabulary: `tokens.css`.
= []
= []
# Each library is opt-in.
= ["dep:async-trait", "dep:serde", "dep:uuid", "dep:jiff"]
# Dep-light Dioxus UI kit (mirrors `@evinvest/uikit`). Renderer-agnostic RSX components;
# pulls only Dioxus + tailwind_fuse (the `cn!` engine). Unlike the kernel this
# library carries runtime deps — a UI kit can't be zero-dep; see AGENTS.md.
# `document`: the sonner toaster injects its stacking CSS through `document::Style`.
= [
"dep:dioxus",
"dep:ev_lib_classes",
"dep:tailwind_fuse",
"tailwind_fuse?/variant",
"dep:strum",
# `asset` is what puts `asset!` in scope for `Fonts`; `document` is how it
# and the sonner toaster inject their CSS.
"dioxus?/asset",
"dioxus?/document",
]
# PostHog product analytics (mirrors `@evinvest/analytics`). A small typed event
# API: native (Axum) async capture over `reqwest`; the Dioxus/wasm frontend POSTs
# the same payload via reqwest's fetch backend (no PostHog JS SDK). Carries runtime
# deps — opt-in, never in the kernel; see AGENTS.md.
= [
"dep:serde",
"dep:serde_json",
"dep:reqwest",
"dep:dioxus",
"dep:js-sys",
"dep:web-sys",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
]
# Error monitoring / Sentry (mirrors `@evinvest/error-monitoring`). Native (Axum)
# on the `sentry` crate (+ its tower/tracing integrations); the Dioxus/wasm frontend
# builds a Sentry envelope in pure Rust and POSTs it via fetch, plus a panic hook.
= [
"dep:serde",
"dep:serde_json",
"dep:sentry",
"dep:reqwest",
"dep:js-sys",
"dep:web-sys",
"dep:wasm-bindgen",
"dep:wasm-bindgen-futures",
]
# OpenTelemetry logs + traces over OTLP/gRPC (native backends only; the browser
# never links an OTLP stack). Two `tracing` layers + a flush guard, plus tonic
# interceptors for W3C trace propagation across the money-flow services.
= [
"dep:opentelemetry",
"dep:opentelemetry_sdk",
"dep:opentelemetry-otlp",
"dep:opentelemetry-appender-tracing",
"dep:opentelemetry-semantic-conventions",
"dep:tracing-opentelemetry",
"dep:tracing",
"dep:tracing-subscriber",
"dep:tonic",
]
# Frontend-only A/B testing (mirrors `@evinvest/experiments`). Cookie-bucketed
# weighted variant assignment for Dioxus; exposure is reported through an injected
# sink, so it never imports `analytics` (no cross-library coupling).
= ["dep:dioxus", "dep:js-sys", "dep:web-sys", "dep:wasm-bindgen"]
# Five-locale i18n (mirrors `@evinvest/i18n`): locale registry, URL contract,
# Accept-Language negotiation, an ICU-subset formatter, the translation policy,
# and the `t!` macro. Wasm-safe and zero-dep *there* — the CLDR plural rules and
# number grouping for EV's five locales are hand-written rather than pulling in
# ICU4X, which would add megabytes of locale data to a Dioxus wasm bundle. The
# one dep, `inventory`, is native-only: it is how `t!` sites become a catalogue,
# and a shipped bundle extracts nothing.
= ["dep:inventory"]
# Typed env settings (mirrors `@evinvest/settings`). The `settings!` macro reads
# env vars into a validated struct: aggregate error reporting, `= "literal"`
# defaults, `Option` = optional, `#[secret]` redaction. Env-only by design — no
# config files, no hot reload; sops/age decrypt at the shell/CI boundary and this
# library only reads the already-injected environment. Zero runtime deps.
= []
# Shared domain TypeObjects — PhoneNumber, Email, … — with validation.
# Zero runtime deps, wasm-safe (mirrors `@evinvest/types`).
= []
# Producer SDK for landing-host microfrontends (see `mfe.rs` + the `mfe!` macro).
# wasm-only: the module is gated to `target_arch = "wasm32"`, so this is inert on
# native. A producer crate enables it; landing never compiles ev_lib at all.
# `wasm` pulls `dioxus?/web` + `web-sys`; `document` is for the bundle's `<link>`;
# `launch` is the `LaunchBuilder` behind `launch_into`, which a producer crate
# would otherwise have to enable itself for this feature to compile.
# `i18n` is not optional here: a producer declares its catalogue in the `mfe!`
# invocation, so an element remote cannot ship without having resolved its
# locale — which is the failure this pairing exists to make impossible.
= [
"dep:dioxus",
"dep:wasm-bindgen",
"dep:js-sys",
"dioxus?/document",
"dioxus?/launch",
"i18n",
"wasm",
]
# One opt-in switch that layers wasm/browser backends onto whatever other
# features are enabled — each feature contributes its own wasm needs here with
# the `pkg?/feature` syntax (no-op when that feature is off). Enable it
# per-target on the consumer side (`[target.'cfg(target_arch = "wasm32")']`),
# never globally, so native builds don't link browser backends.
= ["uuid?/js", "dioxus?/web", "dep:web-sys"]
[]
= { = true, = true }
= { = true, = ["macro", "html", "signals", "hooks"], = true }
= { = true, = true }
= { = true, = ["serde"], = true }
= { = true, = ["derive"], = true }
= { = true, = true }
= { = true, = true }
= { = true, = true }
= { = true, = ["serde", "v4"], = true }
# Native (non-wasm) backends for the I/O libraries. Kept out of wasm builds so the
# browser target never links a native TLS stack or the `sentry` crate.
[]
# How `t!` sites become a catalogue (the `i18n` feature): the linker collects
# them, so a site that compiles is registered whether or not it ever renders.
# Native-only — a shipped wasm bundle extracts nothing, and stays zero-dep.
= { = "0.3", = true }
# OpenTelemetry (the `otel` feature). Native-only, pinned to a mutually-consistent
# 0.31-era set; `tracing-opentelemetry` tracks one minor ahead of the core crates.
= { = "0.31", = true, = ["trace", "logs"] }
= { = "0.31", = true }
= { = "0.31", = true, = false, = ["trace", "logs", "http-proto", "reqwest-blocking-client"] }
= { = "0.31", = true }
# No rt-tokio: the batch processors run on their own threads, so telemetry() can
# build before the tokio runtime exists (backends init tracing pre-runtime for Sentry).
= { = "0.31", = true, = ["trace", "logs"] }
= { = "0.13", = true, = false, = ["rustls", "json"] }
= { = "0.48.2", = true, = ["tower-axum-matched-path", "tracing"] }
= { = "0.13", = true, = false }
= { = "0.1", = true }
= { = "0.32", = true }
= { = "0.3", = true, = false, = ["registry", "std"] }
# Browser backends for the I/O libraries. Enabled per-target on the consumer side
# (see the `wasm` feature); never linked into native builds.
#
# `Location` is not ours: dioxus-web 0.7.9's `history.rs` calls `window.location()`
# unconditionally but only declares `web-sys/Location` under its `devtools` feature,
# and `dioxus` depends on it with `default-features = false` — so a plain
# `dioxus/web` build fails to compile upstream. `dx build`/`dx serve` hide it by
# enabling `dioxus/devtools`; a bare `cargo check --target wasm32-unknown-unknown`
# does not. web-sys features unify across the graph, so declaring it here supplies
# the binding. Drop this once dioxus-web declares its own.
[]
= { = "0.3", = true }
= { = "0.13", = true, = false, = ["json"] }
= { = "0.2", = true }
= { = "0.4", = true }
= { = "0.3", = true, = ["Document", "Window", "HtmlDocument", "Storage", "Navigator", "Element", "TransitionEvent", "Location"] }
[]
= { = ".", = ["architecture", "uikit", "analytics", "error_monitoring", "experiments", "settings", "types"] }
= true
= { = true, = ["ws"] }
= { = true, = ["signals", "hooks"] }
= { = true, = ["axum"] }
= true
= { = true, = ["serde"] }
= { = true, = ["derive"] }
= true
= { = true, = ["macros", "rt", "net", "io-util", "time"] }
= { = true, = ["serde", "v4"] }
[[]]
= "all_primitives"
= ["uikit"]