Getting started
Fences tagged exec run in document order, in one shell session, from the root of the clone;
just tutorial runs them (tools/doc-exec). Untagged fences are prose.
In a few minutes you build the command line, read the model store, simulate a model and compare the result with the committed prediction, and build the packages for the machine in front of you. Nothing here talks to a device.
Before you start
A clone of this repository and the Rust toolchain it pins (rust-toolchain.toml; rustup
reads it). For the packages, zig and cargo-zigbuild
(crates/studio/build-xtask/scripts/install-zig.sh, install-cargo-zigbuild.sh).
1. Build the CLI
cargo build -p labinetix
export PATH="$PWD/target/debug:$PATH"
2. The three stages
labinetix --help
Define, analyze and build models into taktwerk packages
…
define …
analyze …
build …
define keeps the model store, analyze runs models on the host, build turns them into
packages taktwerk loads. Every command has --help; the
CLI reference lists them all.
3. define: the model store
models/ holds one directory per model: what you write under authoring/, what Labinetix
generates from it under generated/, and the model’s scenarios, estimators, datasets and
parameter sets. Every entity is hashed and locked.
labinetix define list
…model_scaffold chemostat …
define check re-generates the whole store and compares every file byte for byte; it prints
nothing when all is well:
labinetix define check
4. analyze: a model on the host
A model scenario pins the model’s content hash and says how to run it. Simulating it gives the same bytes as the prediction committed beside it:
labinetix analyze simulate models/chemostat/scenarios/feed-step.toml \
| cmp - models/chemostat/scenarios/feed-step.prediction.json && echo identical
identical
5. build: packages for a target
A target is a name from hardware/targets/: a triple and, for a device, the newest glibc its
libraries may need.
labinetix build target
…host-linux The build host
build raw-package compiles every package for a target and writes it into dist/: one
directory per package (descriptor, header, lib/<arch>/, package.toml with its version,
interface fingerprint and maturity), a tarball each and SHA256SUMS.
labinetix build raw-package host-linux
ls dist | grep chemostat
chemostat-…
Where to go next
- From a model to a released package: one model end to end, into taktwerk and back from its record.
- The modeling tutorials: your first model, composition and balances, estimation and identifiability.