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
//! C# backend. Generates `.cs` source files that call into the C ABI
//! exported by BoltFFI, using P/Invoke (`[DllImport]`) for the boundary
//! crossing.
//!
//! # Module layout
//!
//! The backend transforms the language-agnostic IR into `.cs` files:
//!
//! ```text
//! FfiContract + AbiContract
//! │
//! ▼ lower: walk the IR, decide supported + blittable paths
//! CSharpModule (plan: data shapes the templates consume)
//! │
//! ▼ emit: orchestrate + render templates
//! Vec<CSharpFile>
//! ```
//!
//! Core modules:
//!
//! - `plan`: view model. `CSharpType` is the central vocabulary; all
//! wire expressions are pre-rendered strings so templates stay dumb.
//! - `lower`: decision layer. Produces the plan from the IR.
//! - `emit`: orchestrator plus ABI-op → C# syntax helpers.
//!
//! Supporting modules:
//!
//! - `names`: how elements get named in C#. Used by `plan`, `lower`,
//! and `emit`.
//! - `templates`: Askama bindings over `plan`, rendered by `emit`.
//! Snapshot tests live alongside.
//!
//! Module dependencies: `names` is a leaf. `plan` builds on `names`
//! plus the IR. `templates`, `lower`, and `emit` all build on `plan`.
//! `lower` and `emit` cooperate: `lower` calls `emit`'s syntax
//! helpers to pre-render wire expressions into the plan; `emit`'s
//! orchestrator calls `lower` to produce that plan.
pub use ;
pub use NamingConvention;
pub use *;
use ;