Extensions
- Rust SDK (
extensions/rust-sdk): Defines theOrbitronPlugintrait, plugin metadata, and a backend SDK facade (OrbitronSdk) for loading, measuring, rendering, and applying delta updates. The plugin loader is still gated behindexperimental-plugins. - Python bridge (
extensions/python-bridge): PyO3 bindings that wrap the service layer for notebooks, scripts, and downstream automation. Program-neutral result access includesScene.dipole_moment(),Scene.excited_states(),Scene.brillouin_zone(),Scene.residues(),Orbitron.task_summaries(path), andOrbitron.analyze_bond_orders(scene). Builder-facing methods includeScene.from_smiles(),Scene.molecular_electronic_state(), andScene.set_molecular_electronic_state(). See §9.1 for architecture and usage. - The trunk demo page (
viewer/wasm/index.html+app.js), built bytrunk buildintoviewer/wasm/dist/. This is the development harness — the steps below exercise it. - The
<orbitron-viewer>custom element (viewer/wasm/ts/src/orbitron-viewer.ts), bundled bynpm run buildinviewer/wasm/ts(esbuild) to the committedviewer/wasm/orbitron-viewer.js. This is the one that ships: the desktopFile > Export > Web View, the Pythonexport_html, andScene._repr_html_all embed it alongside the wasm shim and binary.
So a change under viewer/wasm/src needs trunk build for the demo page and the staging script (which runs both trunk and esbuild) before anything that embeds the element picks it up.
Wasm viewer scaffold
To sanity-check the pipeline:
Additional notes: - The wasm shell is being split into smaller modules under viewer/wasm/src/wasm (e.g. delta parsing, selection handling, overlay label helpers). Keep new changes localized to these modules and update viewer/wasm/src/wasm/mod.rs when adding files.
Generate a SceneGraph payload using the release CLI and visible scratch space:
mkdir -p ~/scratch/orbitron-wasm conda run -n orbitron-dev cargo build --release -p orbitron-cli --bin orbitron ORBITRON_CLI=target/release/orbitron \ conda run -n orbitron-dev python viewer/wasm/scripts/generate_scene_bin.py \ io/pipelines/tests/fixtures/xyz/benzene.xyz \ ~/scratch/orbitron-wasm/scene.binBuild and serve the wasm app with the scene on the same origin:
cd viewer/wasm conda run -n orbitron-dev trunk build --release cp ~/scratch/orbitron-wasm/scene.bin dist/scene.bin cd dist conda run -n orbitron-dev python -m http.server 8081 --bind 127.0.0.1Load the scene bytes:
http://127.0.0.1:8081/?scene=/scene.bin