Kibo 1.2¶
Warning
Kibo 1 is deprecated. It receives fixes only, for the life of the LTS-1.2 line. New projects generate with kibo 2; existing projects move with the migration guides. See kibo 2, moving a template pack and moving application code.
Kibo is the code generator. It reads a DSM model plus a
Kibo template and emits source code — typed Python and C++ surfaces
wired for the Viper runtime when used with kibo-template-viper.
Kibo is the second step of the code-generation pipeline: DSM → Kibo → kibo-template-viper. Kibo itself
is template-agnostic — change the template and you change the target
language and runtime. This section covers Kibo’s CLI usage. The catalogue
of templated features it produces in the Viper world lives in
kibo-template-viper 1.2.
Place in the ecosystem¶
Depends on — DSM models (
.dsm.jsonfiles), a Kibo template pack.Consumed by — developers, directly (running the JAR) or through the
dsm_util.pywrapper indsviper-tools.Source repository — digital-substrate/kibo. Implemented as a Java tool bridging DSM and StringTemplate.
Distribution — bundled in the DevKit ZIP’s
kibo-1/folder: the JAR inkibo-1/tools/(kibo-1.2.13.jar), the 1.2 pack inkibo-1/templates/.
Quickstart¶
The common Python case (DSM → typed Python package) is wrapped by
dsm_util.py:
python3 tools/dsm_util.py create_python_package model.dsm
Direct Kibo invocation, for finer control or for the C++ surface:
# Python package — consumed by dsviper
java -jar kibo-1/tools/kibo-1.2.13.jar \
-c python -n MyApp \
-d model.dsm.json \
-t kibo-1/templates/python/package \
-o ./generated
# C++ surface — consumed by Viper C++
java -jar kibo-1/tools/kibo-1.2.13.jar \
-c cpp -n MyApp \
-d model.dsm.json \
-t kibo-1/templates/cpp/Data \
-o ./generated
The Python result is a typed package importable as
import MyApp.attachments (or whatever namespace your DSM model
declares), ready to be used through dsviper. The C++ result is
headers and .cpp files designed to link against the Viper C++
runtime.
Topics¶
Status¶
Part of DevKit 1.2.x (LTS, feature-locked).