Rust smart glasses SDK: understand the streaming core boundary

The Rust smart glasses SDK at v0.1.0 is a platform-neutral streaming core with an Android-facing layer. It is not a generic video-search client. This guide reads the tagged Cargo manifest and source modules because that tag has no root README. It explains encoded-sample intake, buffering, reconnect behavior and the separate server-side path needed to search recorded footage.

Updated:

Inspect the Rust smart glasses SDK at its source tag

Start from the v0.1.0 repository tag and inspect system_core/Cargo.toml. It declares the package vmodal-smartglass-system-core, version 0.1.0, with library name vmodal_smartglass_core. The manifest emits both an rlib and a cdylib, which reflects native Rust use and an external boundary. Check its declared license before choosing how the component belongs in your product.

The setup command below checks out the reviewed release. Work from the system_core directory with the matching Cargo.lock when evaluating its dependencies. This page does not provide an uncompiled Rust application example. The source exports and Android bridge are a more reliable starting point than a guessed search method, especially when a repository tag has no top-level getting-started document.

git clone --branch v0.1.0 --depth 1 https://github.com/v-modal/vmodal_sdk_smartglass.git

Reference: v0.1.0 repository tag; system_core/Cargo.toml and Cargo.lock

Keep camera capture and encoded-sample intake distinct

The public core exports EncodedSample, SampleFlags and H264Framing. The sample representation includes encoded bytes, presentation time, flags and a generation value. That is a transport-facing boundary, not a declaration that the Rust core controls every camera or headset. The device integration must supply the samples and timing required by the selected capture and encoding path.

For a pilot, draw the producer boundary explicitly: which platform component captures frames, which encodes them and which pushes encoded samples into the core? Keep the original units and flag meaning visible across that interface. A successful function call alone does not prove that a receiving stream can decode the sequence or preserve the intended timeline. Verify those properties with the actual device pipeline.

Use bounded buffering outcomes as operational signals

The buffer module defines outcomes including Accepted, BackpressureDrop, NeedKeyframe, Stopped and InvalidSample. Those distinct results matter to the producer. An application should not treat every submitted sample as delivered media. Backpressure and keyframe requirements need to be understood in relation to the capture cadence, encoder output and the state of the stream.

Inspect the buffer and session code together before selecting an integration policy. During testing, create a slow-consumer condition and observe whether the producer responds appropriately to the reported outcome. Keep metrics and stream state visible in the device-side diagnostic flow. This guide does not promise lossless retention of all frames or automatic conversion of a live stream into a durable searchable archive.

Understand reconnect delays and session transitions

The reconnect policy reads configured delays, jitter and a disconnect timeout. The code computes a delay for an attempt and reports when the disconnected interval reaches the configured timeout. Evaluate these settings with the session and transport modules rather than reducing reconnect behavior to an unconditional retry loop in the Android application.

Test a short interruption, a longer outage and a clean stop as separate cases. Watch what the session reports and what the receiver actually sees after reconnection. Recovered connectivity does not automatically establish that every earlier sample arrived. Record the state transition and any dropped interval so the product can describe what was captured without hiding a gap behind a connected indicator.

Relate the Rust core to Android and JNI ownership

The repository contains a Kotlin client, bridge interfaces, JNI implementation and video-pipeline components. That layout separates Android lifecycle and encoding concerns from the platform-neutral core. Begin with the matching tagged Kotlin layer if your target is Android, and trace configuration, sample intake and session events across the bridge. Keep ownership and shutdown responsibilities explicit on both sides.

A native library boundary also carries structured errors and state back into the parent app. Use the actual bridge contract when designing status screens, and test stop or disposal while samples are arriving. Do not assume that a generic Rust crate integration reproduces the Android device pipeline. Different capture adapters need their own qualification against the same encoded-sample and session expectations.

Search belongs in a separately qualified server-side workflow

The streaming core’s exported surface is about samples, configuration, sessions and transport. To search wearable footage, separately confirm how the receiver retains media, how it is ingested into a collection and when its applicable index becomes ready. Then use a supported API or search SDK against that collection. The core should not be advertised as performing generic on-device semantic retrieval.

A useful end-to-end evaluation follows a visible recorded event through the device, stream receiver, stored source, indexing and search result. Preserve the relationship between presentation timing and the media source used downstream. If any stage is only a proposed integration, label it as such. Bring the target hardware, capture layer, receiver format and last validated checkpoint to the beta discussion so streaming and search claims stay tied to observed behavior.

Related guides

Sources

Request beta access