Skip to main content

libopenzilo

中文 · MPL-2.0

Unified OpenZilo interaction library. A high-performance, pure-Rust core for the OpenZilo protocol engine, device session state machines, audio decoding (Opus and legacy Speex), IMU calibration with 6-DoF attitude fusion, and signed OTA. Native Python and Kotlin bindings (UniFFI) give every platform identical data structures and interaction semantics.

Ecosystem and platform boundaries

Repository Responsibility
libopenzilo Unified Rust interaction core, UniFFI bindings (libopenzilo / com.zilo.libopenzilo) and the cross-platform core tests
OpenZilo Python BLE/asyncio SDK, CLI and Python examples built on libopenzilo
OpenZilo-Connect Android companion app, BLE/GATT integration in ring-core, and the connect-api client AAR

Hosts provide BLE scanning and GATT I/O, OS permissions, monotonic clocks, background execution and file persistence. libopenzilo owns everything platform-independent: wire frames, capability checks, request recovery, audio codecs, sensor calibration and OTA verification. The crate has no BLE stack, UI or application runtime.

Core capabilities

Area Capabilities
Protocol and transport rules Protocol v4 framing and CRC; stream decoding that drops corrupt frames and keeps valid neighbors; NUS UUIDs and write limits, ring-name and address matching
Sessions and policy DeviceEngine / DeviceSession request recovery, capability admission and legacy profiles, connection RSSI, recording state, RingBindings for several rings, shared error text
Audio Pure-Rust Opus (RingOpusDecoder, decode_opus_pcm) and legacy Speex (RingSpeexDecoder, decode_speex_pcm) to PCM, dual-mic denoising, OP2C/Ogg/WAV containers, stored-file download and automatic reception, live validation; no ffmpeg or C codec
IMU Raw-to-physical conversion, static-window collection, six-face and gyro-bias calibration with validation, 6-DoF quaternion attitude and posture classification, portable and scoped calibration profiles
Firmware Signed bundle verification (ECDSA P-256), OtaTransfer, board identity and running-version checks
Distance Validity, quality and expiry tracking for host-supplied measurements; no OS ranging and no public PPG interface

Pure-Rust audio

RingOpusDecoder and decode_opus_pcm() produce 16 kHz PCM16LE and preserve mono or interleaved L/R stereo. RingSpeexDecoder and decode_speex_pcm() decode Ogg Speex, length-prefixed or fixed-size raw packets to the requested rate, channels and depth. For synchronized stereo with aligned speech, use one DualMicDenoiser per stream to convert complete 20 ms frames to mono; it attenuates energy that differs between the mics and does not align channels or remove noise common to both.

Use LiveValidator for complete live recordings. For preview playback only, opt in with LivePreviewValidator: each accepted packet returns events in order, with a Gap before the DATA or END that revealed missing 20 ms frames. Preview END reconciles device drops, not completeness; the application chooses whether to conceal the loss or insert silence.

Opus uses pure Rust opus1 and Speex uses pure Rust oxideav-speex (MIT); include these notices when distributing binaries.

Multiple rings

RingBindings is optional. Bind a host-assigned ID to the CPU ID (or serial number), persist list(), and restore() on restart. After probing a BLE link, attach() checks the identity and returns a separate engine and generation; route callbacks to that engine. Call detach(id, attachment) when the transport closes and detach before unbind(). BLE, persistence and reconnect scheduling stay with the host.

Build, bindings and validation

Rust 1.95 or newer is required. Python wheels also need Python 3.10+ and maturin. No C compiler, JDK, Android SDK or NDK is needed to build or test the core.

cargo fmt --check
cargo clippy --locked --all-targets -- -D warnings
cargo test --locked
maturin build --release --locked --out dist

The Rust crate, Python distribution and Python import are all named libopenzilo.

import libopenzilo as core
wire = core.encode_packet(0x0101, b"")
assert core.decode_packet(wire).command == 0x0101
print(core.library_info().features)

Generate Kotlin bindings from the host library (Linux example):

cargo build --locked --features cli
cargo run --locked --features cli --bin uniffi-bindgen -- generate --library target/debug/liblibopenzilo.so --language kotlin --config uniffi.toml --out-dir build/bindings/kotlin --no-format

macOS uses .dylib; Windows uses libopenzilo.dll. Generated Kotlin records use com.zilo.libopenzilo. Wheels are native to their build OS and architecture; CI builds Linux x86_64, macOS arm64 and Windows x86_64 wheels, installs them and runs the native smoke check. Publish validated core wheels before dependent SDKs.

See native API, architecture and validation. library_info() reports the linked library's version, API contract and available features. Hardware behavior requires validation on the target device.

Community

Metadata

Release files for libopenzilo 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for libopenzilo 0.2.0
File Interpreter ABI Platform Actions
libopenzilo-0.2.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for libopenzilo-0.2.0-py3-none-win_amd64.whl
libopenzilo-0.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for libopenzilo-0.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
libopenzilo-0.2.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for libopenzilo-0.2.0-py3-none-macosx_11_0_arm64.whl

Total release size: 5.0 MB

Release files / libopenzilo-0.2.0-py3-none-win_amd64.whl

Download URL libopenzilo-0.2.0-py3-none-win_amd64.whl
Size 1.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e2327518d9ac539ec39d6b44502fbbbb68a42fb849babf0aa3d97130ba55a6b7
BLAKE2b-256 checksum
How to use checksums
8d4c9ef98e7da70a35d2daea30a640fbff689a8fd18d3d7c9722293f83cc0c28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / libopenzilo-0.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL libopenzilo-0.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1a09c88ff956a9f9b5387eeea04145715baa248e65177eb37bdbe0a0d695cbcb
BLAKE2b-256 checksum
How to use checksums
fe0769214fad57f0fb71eb65aaf9924aa997d61d6aaeffc27fdf1c4e9ba428b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / libopenzilo-0.2.0-py3-none-macosx_11_0_arm64.whl

Download URL libopenzilo-0.2.0-py3-none-macosx_11_0_arm64.whl
Size 1.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d08e458614d0a3114f915b0e13d2a33855d191e48e81c8f57c898640356c8c67
BLAKE2b-256 checksum
How to use checksums
c3b23a3650d00462c2ee701dbe9afdf7a6146df587802de77d403e1d8de45ca2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for libopenzilo 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page