| Crates.io | vtx-sdk |
| lib.rs | vtx-sdk |
| version | 0.1.14 |
| created_at | 2025-12-27 14:45:22.554402+00 |
| updated_at | 2026-01-20 14:33:13.245351+00 |
| description | Official SDK for developing VTX plugins using Rust and WebAssembly. |
| homepage | |
| repository | https://github.com/vtxdeo/vtx-sdk |
| max_upload_size | |
| id | 2007371 |
| size | 72,484 |
Official Rust SDK for developing VTX Project plugins.
vtx-sdk provides safe, idiomatic Rust bindings for the VTX Host ABI. It abstracts away the complexity of the WebAssembly Component Model (wit-bindgen), allowing plugin authors to focus on business logic rather than low-level bindings.
Type-Safe APIs
Complete Rust wrappers for all WIT import interfaces (SQL, Stream I/O, FFmpeg, Context, Event Bus).
Low Boilerplate
export_plugin! and VtxPlugin provide default implementations for common exports
(migrations, resources, handle_event, authenticate).
Database Integration
SQLite helpers with automatic JSON deserialization.
Helper Utilities
ResponseBuilder, UserBuilder, BufferExt, VtxEventExt, and a unified VtxError model.
Unlike traditional Wasm projects, this SDK does not maintain a local copy of the WIT interface definitions. Instead, it relies on the
vtx-protocol crate as the Single Source of Truth (SSOT).
Build Time
The build.rs script dynamically retrieves the WIT definition path from the vtx-protocol
build dependency and injects it into the compilation process.
Runtime / Metadata
The WIT_DEFINITION constant is also sourced directly from the protocol crate, ensuring
zero divergence between the SDK and the protocol.
Add vtx-sdk to your plugin’s Cargo.toml:
[dependencies]
vtx-sdk = "0.1.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyhow = "1.0"
[lib]
crate-type = ["cdylib"] # Required for compiling to Wasm