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.1

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.1
File Interpreter ABI Platform Actions
libopenzilo-0.2.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for libopenzilo-0.2.1-py3-none-win_amd64.whl
libopenzilo-0.2.1-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.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
libopenzilo-0.2.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for libopenzilo-0.2.1-py3-none-macosx_11_0_arm64.whl

Total release size: 5.0 MB

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

Download URL libopenzilo-0.2.1-py3-none-win_amd64.whl
Size 1.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
5fead7d968fef3b6736518dc38b71e4b571cc2e10968eb43186ebc122e792300
BLAKE2b-256 checksum
How to use checksums
f8a6f5fb152cb090b1aa13dcbada7ba0cabf2083950084a8d1569c2c058d6c13
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.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL libopenzilo-0.2.1-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
8ca071a0d5d5b4230be1a2907c2120dc513609255496b5ecca76b893438282b4
BLAKE2b-256 checksum
How to use checksums
2fdb002d224892f924a4ad0670286fdb8b709b02004fe452157646935767949d
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.1-py3-none-macosx_11_0_arm64.whl

Download URL libopenzilo-0.2.1-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
08072f29e40af8a7489bf40ab2ac56361036e612216ea40989235465ef75e09d
BLAKE2b-256 checksum
How to use checksums
03102cd60fe12a43691e4270a3617d8d4d615696d7870ede24da1fd08bf81fe5
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.1

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.1 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