Skip to main content

Crate zerodds_idl_ts

Crate zerodds_idl_ts 

Source
Expand description

IDL → TypeScript Codegen for DDS-TS 1.0.

Crate zerodds-idl-ts. Safety classification: STANDARD.

§Scope

Generates .ts source from a parsed IDL AST per the documentation/specs/dds-ts-1.0/main.tex vendor specification. Output uses uniform structural interfaces (no class promotion), Type-Descriptor side-tables, and the @zerodds/types runtime library bundled under src/runtime/.

§Mapping summary (DDS-TS 1.0 §7)

boolean              | boolean
char / wchar         | Char / WChar    (branded, runtime/branded.ts)
octet                | number          (0..255)
short..int32         | number
long long..int64     | bigint
float / double       | number
long double          | LongDouble      (opaque carrier, 16 bytes)
string / wstring     | string          (+ _BOUND const if bounded)
any                  | DdsAny          (boxed value with typeId)
sequence<T>          | Array<T>        (+ _BOUND if bounded)
T[N]                 | Array<T>        (+ _LENGTH const)
map<K, V>            | ReadonlyMap<K', V'>
struct               | interface       + DdsTypeDescriptor + type-guard
exception            | interface       + extends DdsException
enum                 | as-const object + string-literal-union (no `enum`)
union                | discriminated union  + descriptor (literal narrowing)
typedef T name       | export type name = T  + descriptor
bitset               | interface (number/bigint per width) + _BITS consts
bitmask              | as-const shifts (number/bigint per @bit_bound)
interface (Ops)      | { Iface }Client + { Iface }Handler + ServiceDescriptor

Modules§

runtime
Pure-TypeScript Runtime-Library, die der Codegen-Output importiert.

Structs§

CodegenConfig
Configuration for diagnostic-aware codegen.
Diagnostic
Diagnostic record emitted by the codegen.

Enums§

IdlTsError
Fehler-Type fuer den TS-Codegen.
Severity
Severity of a Diagnostic.

Functions§

generate_ts_source
Codegen entry point. Produces a TypeScript source string for a parsed IDL Specification per DDS-TS 1.0.
generate_ts_source_with_amqp
Spec §7.2.3 / §8.1.2 / §8.1.3 — Codegen mit angehängten AMQP-Bindings.
generate_ts_source_with_config
Diagnostic-aware codegen with explicit configuration.
generate_ts_source_with_diagnostics
Diagnostic-aware codegen entry point.