vmix-rs
A Rust library for interacting with vMix via TCP and HTTP APIs.
Features
This library is organized into separate crates for different use cases:
- vmix-core: Core data structures (XML parsing optional via
xmlfeature) - vmix-tcp: TCP API client
- vmix-http: HTTP API client (async)
- vmix-rs: Convenience wrapper (this crate)
Installation
Desktop Applications
[]
# Both TCP and HTTP support
= { = "0.2.1", = ["full"] }
# TCP only
= { = "0.2.1", = ["tcp"] }
# HTTP only
= { = "0.2.1", = ["http"] }
WebAssembly
[]
# With XML parsing support
= { = "0.2.1", = ["xml"] }
Embedded Systems (no_std)
[]
# Struct definitions only (lightweight)
= "0.2.1"
# With XML parsing (if needed)
= { = "0.2.1", = ["xml"] }
Usage
Desktop Applications
use ;
use Duration;
// TCP API
let client = new?;
// HTTP API
let http_client = new;
WebAssembly
use ;
// Fetch XML from vMix via your HTTP client
// let xml = fetch_xml_from_vmix().await?;
// Parse XML to strongly-typed structures
let vmix_state: Vmix = from_str?;
println!;
Embedded Systems (Embassy, etc.)
extern crate alloc;
use Vmix;
// Option 1: Use struct definitions only
// Manually populate structs from TCP XMLTEXT commands
// Example: XMLTEXT vmix/active -> "1"
// Option 2: With XML parsing (requires 'xml' feature)
use from_str;
Examples
# TCP client
# HTTP client
# TCP/HTTP comparison
License
MIT
Author
Shugo Kawamura (@FlowingSPDG)