Fundamentals (IDL · CLI · parsing)
How .deuk (and imported .proto / .thrift, etc.) is structured in the engine, and what you can pass on the CLI.
IDL declaration kinds (declarationKind)
The parser tags struct-like declarations in four ways. Wire layout can mostly follow the same rules as record; codegen and checks differ.
| Keyword | Meaning (short) |
|---|---|
struct / record |
Plain DTO / row data. Default declarationKind is record. |
message |
Naming convention for network payloads. Pairs well with ProtocolRegistry / msgId. |
table |
Table definitions / meta tables (header + infos, etc.). Ties into MetaTableRegistry and loaders. |
entity |
DB persistence rows. Emits C# data annotations ([Table], [Key], [Column]). With --ef, also DbContext. |
The AST also carries enum, typedef, const, service (Thrift RPC compatibility), namespace, and more.
CLI & includes
- Entry:
npx deukpack <idl_file> <out_dir> [options]or--pipeline <config.json>. - Includes:
-I/-i(one path),-r/--include-recursive(that directory and all nested subfolders). - IDL root folder name:
--define-root(default_deuk_define, legacy_thrift). - Emit:
--csharp,--cpp,--ts,--js(combinable). - C# extras:
--csharp-project-name,--csharp-nullable,--no-csharp-csproj,--allow-multi-namespace,--brace-less-namespace. - More:
--protocol,--endianness,--convert-to-deuk,--emit-per-file,--wire-profile, OpenAPI / flat-file merge & emit (see Schema I/O below).
Full table: API reference — CLI.
Programmatic use (Node library)
- Parse / AST: use
DeukPackEngine(or the same entry points) from code. - Multi-language emit: v1 recommends the CLI (v1 scope).
Wire families (one line)
- Deuk native (
deuk):pack,json,yaml— npm JSWireSerializerandserialize()default (pack). - Interop (Thrift):
tbinary,tcompact,tjson— generated C# / C++ plus JS withinteropRootStructon options.
Matrix & simple npm API: Wire protocol families. Spec: Interop vs native wire.
Types & inheritance
Extended types vs Protobuf/Thrift: API reference — Extended types. extends: Unified Write tutorial and Messages & wire.
Hands-on (DeukPack Kits)
- Part I — Threshold — where one IDL line splits into stacks.
- Wire & serialization topics — short reads linking tables, messages, stacks.
Next: Tables · Messages & wire · Database & entities.