Templated Features¶
The catalogue of templated features shipped with kibo-template-viper —
what each one does, in C++, Python, and TypeScript. Use this page to pick the
features you need; pass each to Kibo via the -t flag (see the
Kibo usage guide).
C++ Templates¶
Templates in templates/cpp/ are organised by theme:
Core Types¶
Feature |
Purpose |
|---|---|
|
Type implementations for enum, struct, concept, club |
|
Definitions, paths, fields |
Persistence¶
Feature |
Purpose |
|---|---|
|
Attachment accessors |
|
SQLite persistence layer |
Serialization¶
Feature |
Purpose |
|---|---|
|
Binary encoder / decoder |
|
JSON encoder / decoder |
|
Bridge between static C++ and dynamic Viper C++ values |
|
Content hashing for values |
|
Viper C++ type mappings |
Function Pools¶
Feature |
Purpose |
|---|---|
|
Pure function bindings |
|
Remote function call API |
|
Stateful function bindings |
|
Remote stateful calls |
|
Pool exposing attachment API |
Python Integration (C++ side)¶
Feature |
Purpose |
|---|---|
|
Python module constants for types and paths |
Testing¶
Feature |
Purpose |
|---|---|
|
Unit tests for fuzzing, JSON, streaming, storing — including the seedable fuzz harness |
|
Test application entry points (each accepts |
Python Templates¶
Templates in templates/python/package/. All Python features are emitted
as a single Python package — typed proxy classes (with type hints) that
delegate to the dsviper runtime. No C bindings, no extension module:
pure Python on top of dsviper’s dynamic API.
Feature |
Purpose |
|---|---|
|
Package initialization |
|
Type definitions for Viper C++ |
|
Classes for concepts, clubs, enums, structures |
|
Typed attachment proxies (over |
|
Typed database-attachment proxies |
|
Field path constants |
|
Dynamic type definitions |
|
Typed function-pool proxies |
|
Typed stateful-pool proxies |
|
Typed remote-call proxies |
|
Typed remote stateful-call proxies |
|
Minimal |
TypeScript Templates¶
Templates in templates/typescript/. Emitted as a single npm package —
typed TypeScript classes that delegate to the
@digitalsubstrate/dsviper Node binding. The TypeScript analogue of the
Python package: the same model-shaped surface and the same Dual Reality
split, over the Node runtime instead of CPython.
One difference from the Python pack: a Node back-end consumes services as a
remote client only, so the TypeScript surface ships the remote function-pool
clients (function_pool_remotes.ts, attachment_function_pool_remotes.ts)
but not the local pools (function_pools, attachment_function_pools).
Feature |
Purpose |
|---|---|
|
Package entry point — re-exports |
|
DSM type definitions |
|
Classes for concepts, clubs, enums, structures |
|
Typed attachment proxies (over the Node binding) |
|
Typed database-attachment proxies |
|
Field path constants |
|
Dynamic type definitions |
|
Typed remote-call clients (over |
|
Typed remote stateful-call clients |
|
Minimal |
|
TypeScript compiler configuration for the package |
Note
Unlike the Python package, the TypeScript surface ships only the remote
function-pool clients. The Node binding reaches function pools over
ServiceRemote, so there is no local (function_pools /
attachment_function_pools) variant.
Picking a feature set¶
You don’t need every feature. Common selections by use case:
# Minimal — types only
templates = ['Data']
# Persistence (typed data on disk)
templates = ['Model', 'Data', 'Attachments', 'Database']
# Full stack — types + persistence + serialization + RPC
templates = [
'Model', 'Data',
'Stream', 'Json',
'Attachments', 'Database',
'ValueType', 'ValueCodec', 'ValueHasher',
'FunctionPool', 'AttachmentFunctionPool',
]
# With testing
templates += ['Test', 'TestApp']
For invocation patterns, see Kibo usage.