vmix-rs

Crates.iovmix-rs
lib.rsvmix-rs
version0.2.1
created_at2026-01-11 09:33:17.281185+00
updated_at2026-01-16 10:48:04.446537+00
descriptionvMix HTTP/TCP API Library
homepage
repositoryhttps://github.com/FlowingSPDG/vmix-rs
max_upload_size
id2035468
size38,734
Shugo Kawamura (FlowingSPDG)

documentation

README

vmix-rs

A Rust library for interacting with vMix via TCP and HTTP APIs.

Crates.io Documentation License: MIT

Features

This library is organized into separate crates for different use cases:

  • vmix-core: Core data structures (XML parsing optional via xml feature)
  • vmix-tcp: TCP API client
  • vmix-http: HTTP API client (async)
  • vmix-rs: Convenience wrapper (this crate)

Installation

Desktop Applications

[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"] }

WebAssembly

[dependencies]
# With XML parsing support
vmix-core = { version = "0.2.1", features = ["xml"] }

Embedded Systems (no_std)

[dependencies]
# Struct definitions only (lightweight)
vmix-core = "0.2.1"

# With XML parsing (if needed)
vmix-core = { version = "0.2.1", features = ["xml"] }

Usage

Desktop Applications

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));

WebAssembly

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);

Embedded Systems (Embassy, etc.)

#![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)
}

Examples

# 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

License

MIT

Author

Shugo Kawamura (@FlowingSPDG)

Commit count: 30

cargo fmt