First-party templated features targeting the Viper ecosystem (Viper C++ runtime + dsviper Python binding). Consumed by Kibo to generate the static API surface that lets C++ and Python developers work against typed wrappers instead of stringly-typed metadata.
Full documentation: https://docs.digitalsubstrate.io/kibo-template-viper/
Part of the DevKit ecosystem.
cpp/ # C++ surface templates targeting Viper C++ API
Data/ # struct, enum, concept, club implementations
Database/ # SQLite persistence
Stream/, Json/ # codecs
ValueCodec, ValueType, ValueHasher
Attachments/, AttachmentFunctionPool/, FunctionPool/
Test/, TestApp/
python/ # Python surface templates targeting dsviper API
package/ # the importable Python package generated for a model
For the conceptual ground (templated feature, Template Model, the role of Kibo), see the user-facing docs:
devkit-doc/source/kibo/usage.mddevkit-doc/source/kibo/templates.mddevkit-doc/source/kibo/template_model.md
These templates are surface templates: each one is a static projection
of one Viper runtime feature (Database, Codec, Stream, Attachments, …).
They are part of the Viper public API by another name — modifying
cpp/Database is no more anodyne than modifying
viper/src/Viper/Viper_Database.hpp.
Versioning follows the Viper C++ API and dsviper Python API public-
contract lines: any breaking change to a cpp/ template tracks the
corresponding C++ API bump; same for python/ against dsviper.
Templates here are consumed by Kibo, which produces the generated code:
java -jar kibo-X.Y.Z.jar \
-c cpp \
-n MyApp \
-d MyApp.dsm.json \
-t /path/to/this/repo/cpp/Database \
-o ./generatedIn practice, dsm_util.py and the various generate.py scripts
resolve this path automatically via the sibling-checkout convention
or via the KIBO_TEMPLATES environment variable.
This repo is for first-party templates only (DS-maintained). Third
parties writing their own templated features follow the same .stg
conventions but live in their own repos.
This project is licensed under the MIT License — see LICENSE.
The templates themselves are open source. Each template, when processed by Kibo against a user model, also emits a header comment in the generated file that records this licensing posture (templates: MIT, runtime: Commercial) so the licensing story remains visible to the end user of the DevKit.
Templates in this repository emit code that is not standalone — at runtime it depends on:
viper(C++ runtime, forcpp/templates) — proprietary, distributed underLicenseRef-DigitalSubstrate-Commercial-1.2.dsviper(Python runtime, forpython/templates) — proprietary Python wheel published on PyPI underLicenseRef-DigitalSubstrate-Commercial-1.2. See https://pypi.org/project/dsviper/.@digitalsubstrate/dsviper(Node binding, fortypescript/templates) — proprietary npm package over the same Viper runtime, underLicenseRef-DigitalSubstrate-Commercial-1.2. See https://www.npmjs.com/package/@digitalsubstrate/dsviper.
The runtime's MAJOR.MINOR is the compatibility contract — the on-disk
format and public API are locked across a minor. The PATCH is versioned
independently per binding, so the numbers differ between targets:
| Templates | Runtime | Compatible versions |
|---|---|---|
typescript |
@digitalsubstrate/dsviper (npm) |
>=1.2.1 <1.3.0 |
python |
dsviper (PyPI wheel) |
1.2.x (built against 1.2.17) |
cpp |
viper (C++ runtime) |
1.2.x (built against 1.2.17) |
Only the typescript output enforces this — a >=1.2.1 <1.3.0 floor
in the generated package.json. The floor is >=1.2.1 (not 1.2.0)
because the Node binding decodes the embedded definitions correctly from
1.2.1 onward. The python and cpp outputs carry no version pin; any
1.2.x runtime is compatible.
The MIT license above governs the templates as source. The output
of kibo produced from these templates is a derivative work of MIT
material and remains free of obligations beyond the standard MIT
notice; however, executing that output requires a runtime listed
above, and the runtime's own licence applies independently. Any
commercial deployment therefore requires a Commercial Licence from
Digital Substrate for the relevant runtime.