Web and Embedding¶
This pillar covers how Caliper reaches a browser or another program: the web viewer, its views and elements, the embedding package, and the planned steps to the whole interface in a browser and to other languages.
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¶
- EMB-01 Web Viewer. The web viewer shows live views from a Caliper stream in a browser, as the viewer page that caliper.serve() serves and as the notebook widget.
- EMB-02 Points in the Browser. Points draw in the browser through the WebGPU renderer, as instanced quads with the native colour rule and depth test, because WebGPU draws a point one pixel wide.
- EMB-03 TypeScript Views. Views written in TypeScript draw every live view kind in the browser, with Canvas 2D where needed, when WebGPU gives no adapter.
- EMB-04 WebAssembly Views. Caliper's own view layer, compiled to WebAssembly and drawn through WebGPU, draws every live view kind in the browser behind the caliper-view element.
- EMB-05 Browser Elements. The web package defines the custom elements caliper-view and caliper-controls, which read a wire protocol v3 stream and share one WebSocket per source.
- EMB-06 Spec Page. A saved spec applet opens in a browser tab at the page that Caliper API serves at /v0/spec, drawn with the spec page's layout and look from the app's panel data.
- EMB-07 Caliper Embed 1.4.0. Caliper Embed 1.4.0 is the framework core behind a small C ABI, installed as one shared library with headers and a CMake package, with a version call and typed live views.
- EMB-25 Tensor Views in Caliper Embed. A host program hands the embedded core a CaliperTensor and the core draws it as a texture in a window named after the view, over a device path with no silent fallback.
- EMB-26 Torch-Free Caliper Embed. The caliper-embed package builds and runs without libtorch, so that a host program that embeds it links no torch.
Built¶
- EMB-08 Scenes in the Browser. Every scene primitive draws in the browser through the WebGPU backend of the graphics layer, under the parity rules, so that a scene looks the same in the app and in a browser. Sprint 4.
- EMB-16 One WebGPU Path in the Browser. The TypeScript WebGPU views are removed, so that the WebAssembly views are the browser's one WebGPU path and the element's own views draw with Canvas 2D. Sprint 4.
- EMB-30 Dashboard Viewer Parity. The browser's dashboard viewer shows a dashboard as the app does, with the programs of its scene panels, the app's series colours and names, every control with its state, and the layout's control rows.
Planned¶
- EMB-09 ImPlot3D in the Browser. ImPlot3D, which EmbedScope and GPTScope use for 3-D plots, is part of the browser module so that its views draw in a browser.
- EMB-10 Whole Interface in a Browser. The whole Caliper interface runs in a browser, with the landing screen, docking and the panes, using the browser's file system, DuckDB's WebAssembly build and cross-origin isolation.
- EMB-11 Applets in a Browser. Applets run in a browser by splitting each into a native computation and a WebAssembly interface that draws from the data stream.
- EMB-12 Several Canvases per Core. One embedded core hosts several canvases, where it now refuses a second canvas after the first.
- EMB-13 Embedding in Web Pages. A small JavaScript interface over the WebAssembly views lets a web product place Caliper views in its own pages, as a native host does through Caliper Embed.
- EMB-14 Rust Bindings. Rust bindings let a Rust program embed Caliper through the embed ABI.
- EMB-15 Swift Bindings. Swift bindings let a Swift program embed Caliper through the embed ABI.
- EMB-17 Scene Fallback Without WebGPU. Where WebGPU is absent, refused or lost, the browser element draws a scene's points in Canvas 2D with a notice that names what it does not draw. Sprint 5.
- EMB-18 Scene Budgets and Device Loss in the Browser. A browser holds at most a set budget of a scene, leaves out the batches over it with a line that says so, and draws the scene again after a lost device. Sprint 5.
- EMB-19 Clipboard and Multi-Touch in the Browser. The browser views accept the clipboard and multi-touch gestures in the canvas.
- EMB-20 More Browsers Tested. The browser views are tested in Safari, in Firefox and on Windows, beside headless Chromium.
- EMB-22 Frame to Image in Caliper Embed. A host program can ask Caliper Embed to render one frame into an image file.
- EMB-23 HiDPI in Caliper Embed. Caliper Embed draws at the full resolution of high-density displays.
- EMB-24 Qt Widget for Caliper Embed. A Qt widget hosts a Caliper Embed canvas in a Qt program.
- EMB-27 Spec Page from a Hub or a Script. The browser page of a spec applet reads its data from a hub or from a script's caliper.serve(), follows live sources over the stream and runs the tensor transforms itself.
- EMB-28 Spec Page Tooltips and Selection. The browser page of a spec applet draws tooltips, selection, zoom and the grid and ticks of 3-D walls, as the app does.
Ideas¶
- EMB-21 Canvas Info Query. Caliper Embed could answer a query that reports the state of a canvas it hosts.
- EMB-29 SQL Sources in the Spec Page. A spec's SQL sources could run in the browser page with DuckDB's WebAssembly build over data loaded into the page.