zerodds-idl-csharp
Layer 3 — Schema (codegen). OMG IDL4-CSharp 1.0 codegen.
- Source: crates/idl-csharp
- API docs: docs.rs/zerodds-idl-csharp
IDL4 → C# 12 source generation per the OMG IDL4-CSharp mapping (formal/2024-12-01). Emits record class aggregates with init-only properties, discriminated-union records, enums and IList<T>/T[] collections, plus the ISequence<T>/IBoundedSequence<T> runtime contract, an annotation bridge (@key/@id/@optional/@extensibility → C# attributes) and an ITopicType<T> marker on every top-level type. A build-time tool (forbid(unsafe_code), std-only) consumed via zerodds-idlc.
Spec anchors
- OMG IDL4-CSharp 1.0 (idl4-csharp-1.0, formal/2024-12-01).
ISequence<T>/ITopicType<T>runtime contract fromOmg.Types.
Quick start
Turn a parsed IDL AST into C# source:
use zerodds_idl_csharp::{generate_csharp, CsGenOptions};
// `ast` is an OMG IDL 4.2 AST parsed by the `zerodds-idl` crate
let cs_src = generate_csharp(&ast, &CsGenOptions::default())?;
Modules
emitter— C# source emission.type_map— IDL → C# 12 type mapping.keywords— C# keyword escaping.error—CsGenErrorfamily.
Coverage & tests
Coverage ledger: idl4-csharp-1.0. Driven by tools/idlc + snapshot tests; run cargo test -p zerodds-idl-csharp.
Stability
1.0.0-rc.3. Driven by tools/idlc + snapshot tests.
zerodds-idl-csharp
Layer 3 — Schema (codegen). OMG IDL4-CSharp 1.0 Codegen.
- Quelle: crates/idl-csharp
- API-Docs: docs.rs/zerodds-idl-csharp
IDL4 → C#-12-Codegenerierung nach dem OMG-IDL4-CSharp-Mapping (formal/2024-12-01). Emittiert record class-Aggregate mit init-only-Properties, Discriminated-Union-Records, enums und IList<T>/T[]-Collections, dazu den ISequence<T>/IBoundedSequence<T>-Runtime-Contract, eine Annotation-Bridge (@key/@id/@optional/@extensibility → C#-Attribute) und einen ITopicType<T>-Marker auf jedem Top-Level-Typ. Ein Build-Zeit-Tool (forbid(unsafe_code), std-only), konsumiert via zerodds-idlc.
Spec-Anker
- OMG IDL4-CSharp 1.0 (idl4-csharp-1.0, formal/2024-12-01).
ISequence<T>/ITopicType<T>-Runtime-Contract ausOmg.Types.
Quick Start
Aus einem geparsten IDL-AST C#-Quellcode erzeugen:
use zerodds_idl_csharp::{generate_csharp, CsGenOptions};
// `ast` is an OMG IDL 4.2 AST parsed by the `zerodds-idl` crate
let cs_src = generate_csharp(&ast, &CsGenOptions::default())?;
Module
emitter— C#-Quellcode-Emission.type_map— IDL → C# 12 Typ-Mapping.keywords— C#-Keyword-Escaping.error—CsGenError-Familie.
Coverage & Tests
Coverage-Ledger: idl4-csharp-1.0. Getrieben von tools/idlc + Snapshot-Tests; cargo test -p zerodds-idl-csharp.
Stabilität
1.0.0-rc.3. Getrieben von tools/idlc + Snapshot-Tests.