Core Runtime and SDK¶
This pillar covers the host, the frozen applet ABI and its service ids, the SDK package and manifests, and the caliper subcommands, and it plans the move of applets out of the core repository and their distribution.
The roadmap graph shows how these features depend on features in other pillars. Ideas for this pillar that are not in the registry are on its candidates page.
Shipped¶
- COR-01 Host. The host is the native application that loads applets, serves them framework services through a frozen C ABI, draws the interface and names no applet itself.
- COR-02 Frozen Applet ABI. ABI epoch 3 is the frozen C header that defines the contract between the host and every applet, and its epoch changes only when the contract breaks.
- COR-03 Service IDs. The 13 service ids are 9 services and their additive revisions, which an applet obtains by id from the host and which the host refuses to serve when it lacks the capability.
- COR-04 SDK Package. The SDK package is the caliper-sdk CMake package, which installs the headers, the pinned UI stack and caliper_add_applet() so that an applet builds outside the Caliper source tree.
- COR-05 Applet Manifests. An applet manifest is a TOML file beside each applet that declares its identity, ABI epoch, minimum host version and required services, and the host parses it before it loads any code.
- COR-06 Applets Loaded from Outside the Repository. The host searches development folders, the user applets folder and the app in a fixed order, chooses one copy of each applet id and checks its manifest before opening the library.
- COR-07 caliper check. caliper check runs the host's pre-load checks on every applet in one folder, without opening any library, and reports whether each is ready.
- COR-08 caliper shot. caliper shot draws one applet's page without a window, as the app draws it, and writes the last frame as a PNG.
- COR-09 caliper dev. caliper dev starts the app with an applet's build folder searched first, so that a rebuilt applet loads without being installed.
- COR-10 caliper build. caliper build configures and builds an applet's folder against the installed SDK with CMake, then runs the checks of caliper check on the result.
- COR-11 caliper serve. caliper serve runs the hub of wire protocol v3 without a window or a GPU, so that producers connect to it and viewers attach to their sessions.
- COR-12 caliper install. caliper install checks a local folder of applets and, when every one passes, copies them into the user applets folder in one all-or-nothing step.
- COR-13 In-Tree Applets. The in-tree applets are three applets under applets/ and the tutorial examples, and each builds on its own against the installed SDK rather than in the core build.
- COR-25 ABI Epoch 3. ABI epoch 3 removes the geometry and export services, and an applet built for epoch 2 is refused with the epoch message.
- COR-39 caliper list. caliper list prints every applet in the search folders with its status, id, version, kind and folder, and the reason for one that is refused, failed or shadowed, without opening any library.
- COR-40 caliper info. caliper info prints the host version, its ABI epoch, the SDK version, the libtorch version, the UI stack hash and one line for each service the host serves.
- COR-41 caliper new. caliper new creates an applet project from a template built into the executable, with a manifest, a source file, a CMake file and a test.
- COR-42 Hidden App Window. The --hidden option runs the real app with its renderer and frame loop but never shows its window, so that a test or an agent can drive the whole app through Caliper API.
- COR-43 Landing Screen. The landing screen has a command bar, the Projects, Instruments, Inspector and Activity panes and a status bar, and it lists, launches and restarts applets and attaches to live sessions.
- COR-44 UI Service. caliper.ui.v1 gives an applet the ImGui, ImPlot and ImPlot3D contexts and the host allocator, and caliper.ui.v1_1 adds the role of each window in the docked layout.
- COR-45 Log Service. caliper.log.v1 writes timestamped log lines from an applet into the host console from any thread.
- COR-46 Jobs Service. caliper.jobs.v1 runs background work on a host worker thread with progress and cancellation, under the crash guard, so that the frame thread stays fluid.
- COR-47 Device Service. caliper.device.v1 reports the compute device the host found, the CPU, CUDA or Metal, so that an applet maps it to its own framework while the host stays framework-agnostic.
- COR-48 Data Service. caliper.data.v1 runs SQL over the host's embedded DuckDB store, shares datasets as named resources and returns results as Arrow streams.
- COR-49 CaliperTensor. CaliperTensor is the frozen type, aligned with DLPack, that describes a block of memory by dtype, shape, strides, device and stream, so that a tensor passes into a service without a copy.
- COR-50 Arrow Table Boundary. Tables cross the ABI as structures of the Arrow C Data Interface, so that the SDK headers hold no DuckDB or framework type.
- COR-51 C++ Sugar for Applets. caliper.hpp is an optional header-only C++20 layer with an Applet class, the CALIPER_APPLET macro and typed wrappers for the services.
- COR-52 Fixture Host for Applet Tests. The SDK's fixture host runs an applet's lifecycle and its jobs in a test without a window or a GPU, so that an applet can be developed test first.
- COR-53 Crash Guard and Frame Watchdog. The host runs every applet call under a guard, quarantines an applet that faults, and reports a frame that stalls, as containment rather than a sandbox.
Planned¶
- COR-14 Inspector Parts as Core Services. This work moves the inspector applet's general pieces into core services, each in its own commit with tests, while the inspector's own panes stay in the applet.
- COR-15 Acceptance Test. The acceptance test checks that the inspector and two existing scopes each build from their own repository against the installed SDK, load into a released Caliper, and that two versions of one applet resolve correctly.
- COR-16 caliper-applets Repository. A caliper-applets repository holds the first-party scopes with their history, the inspector moves to a repository of its own, and CALIPER_BUILD_APPLETS goes away.
- COR-17 Signed Shipped Applets. Shipped applets sit in the app bundle's PlugIns folder and are signed with the app, so that the bundle is never written after it ships.
- COR-18 Applet Registry. The applet registry holds an index of releases per platform and ABI epoch, and it gives the app a Browse tab, install by id and version, and publishing by pull request.
- COR-26 caliper open. caliper open opens a recording file in the app, and the app can be offered as the opener of .mcap files. Sprint 4.
- COR-27 Quiet Job Kind. A job kind of the jobs service dismisses its own finished notice, so that a long computation can stay on the service instead of moving to its own thread.
- COR-28 Install from a URL, Package and Publish. caliper install takes a URL and checks a bundle's checksum and the macOS quarantine flag, and caliper package and caliper publish build and submit a bundle.
- COR-29 SDK as a Release Asset. The SDK is published as a release asset beside each release of the app, and a separate SDK repository waits until outside contributors exist.
- COR-30 Permissions Manifest for Native Applets. A native applet's manifest states what the applet may use, so that a person can accept a signed applet without reading its code.
Ideas¶
- COR-19 .caliperapp Bundles. A .caliperapp bundle is a folder that holds an applet with per-platform binaries, with manifest keys for platforms, authors, licence and runtimes.
- COR-20 Hot Reload. Hot reload would reload a rebuilt applet in the running app, and it needs entry points such as save_state, load_state, on_suspend and on_resume.
- COR-21 SDK Conformance. SDK conformance would add a conformance checker and a set of reference applets built against each SDK release.
- COR-22 Applets in Separate Processes. Applets in separate processes would run each applet in a process of its own, apart from the host, instead of as a library loaded into it.
- COR-23 Signed Third-Party Applets. Signed third-party applets need a signing policy for applets built outside Caliper, so that a notarized host accepts them without weakening library validation.
- COR-31 Applets Written in Python. An applet could be written in Python rather than C++ and loaded by the host.
- COR-32 Scripting Bindings. Bindings for a scripting language could let programs outside C++ call the host and its services.
- COR-33 Runtime Packs. The host could install and manage each large runtime, such as libtorch, once, instead of every applet bundling its own copy, with the limit that applets needing different versions cannot share a session.
- COR-34 Live Input Service. Applet manifests could declare live input slots that the host binds through a live_input service.
- COR-35 More Feed Sources. Applets could register channels of the feed service, and the host could read channels from serial, UDP or MQTT.
- COR-36 Digital Twin Applets. A population twin and a machine thermal twin fed by the feed service could become applets.
- COR-37 Plasma Control Applet. An actor-critic policy that steers a plasma simulation could become an applet of its own.
- COR-38 Reviewer Bundle. One download could run an applet and its demo on a machine that has never built Caliper.
Decisions¶
- COR-24 Registry Order. This decision sets how the applet registry, custom views and signed third-party applets are ordered against each other.