| Crates.io | vmix-rs |
| lib.rs | vmix-rs |
| version | 0.2.1 |
| created_at | 2026-01-11 09:33:17.281185+00 |
| updated_at | 2026-01-16 10:48:04.446537+00 |
| description | vMix HTTP/TCP API Library |
| homepage | |
| repository | https://github.com/FlowingSPDG/vmix-rs |
| max_upload_size | |
| id | 2035468 |
| size | 38,734 |
A Rust library for interacting with vMix via TCP and HTTP APIs.
This library is organized into separate crates for different use cases:
xml feature)[dependencies]
# Both TCP and HTTP support
vmix-rs = { version = "0.2.1", features = ["full"] }
# TCP only
vmix-rs = { version = "0.2.1", features = ["tcp"] }
# HTTP only
vmix-rs = { version = "0.2.1", features = ["http"] }
[dependencies]
# With XML parsing support
vmix-core = { version = "0.2.1", features = ["xml"] }
[dependencies]
# Struct definitions only (lightweight)
vmix-core = "0.2.1"
# With XML parsing (if needed)
vmix-core = { version = "0.2.1", features = ["xml"] }
use vmix_rs::{VmixApi, HttpVmixClient};
use std::time::Duration;
// TCP API
let client = VmixApi::new("127.0.0.1:8099".parse()?, Duration::from_secs(5))?;
// HTTP API
let http_client = HttpVmixClient::new("127.0.0.1:8088".parse()?, Duration::from_secs(5));
use vmix_core::{Vmix, from_str};
// 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(&xml)?;
println!("Active input: {}", vmix_state.active);
#![no_std]
extern crate alloc;
use vmix_core::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)
#[cfg(feature = "xml")]
use vmix_core::from_str;
#[cfg(feature = "xml")]
fn parse_vmix_xml(xml: &str) -> Result<Vmix, quick_xml::DeError> {
from_str(xml)
}
# TCP client
cargo run --example cli --features tcp
# HTTP client
cargo run --example http_example --features http
# TCP/HTTP comparison
cargo run --example tcp_http_comparison --features full
MIT
Shugo Kawamura (@FlowingSPDG)