Files
nim/tests/test_unpack.nim
zeekay 68037f9ca4 Rebrand Cap'n Proto Nim port to ZAP
Rename the capnp/ module set to zap/ and the capnpc compiler to zapc;
rename all .capnp schemas and fixtures to .zap; update every import,
include guard (isInZap), generated-code emission, exception type
(ZapFormatError), and the macro-generated zapUnpackStructImpl/
zapPackStructImpl identifiers to the ZAP brand. Zero capnp/Cap'n Proto
references remain in source or build files; upstream MIT attribution
(Sandstorm, Michał Zieliński) is preserved.

Raise the nimble nim floor from the fictional 0.12.0 to the locked,
verified 0.15.2 (matches nimenv.cfg/build.sh; code carries fixes through
Nim 0.18). Rewrite TODO.md as honest, source-anchored known-limitations
(two-word intersegment pointers, nested/named-union codegen, RPC
interface inheritance) instead of a bare wishlist.
2026-06-19 23:42:02 -07:00

5 lines
484 B
Nim

import examples/calculator_schema, zap, caprpc/rpcschema, collections
let data = "0000000013000000000000000100010002000000000000000000000002000200000000000000000036cc35df92339897010000001700000000000000000002000400000000000100210000000f000000000000000200020000000000000000000300000000000000030000000000000000000000000000000800000001000000000000000000f03f000000000000004004000000010000000300000001000000".decodeHex
let msg = newUnpacker(data).unpackPointer(0, Message)
echo msg.pprint