Skip to main content

Prerequisites

Before building TCP Streamer, ensure you have the following tools installed:

Required Software

Platform-Specific Dependencies

Install the required system libraries:
sudo apt-get update
sudo apt-get install -y \
  libgtk-3-dev \
  libwebkit2gtk-4.0-dev \
  libappindicator3-dev \
  librsvg2-dev \
  patchelf \
  libasound2-dev
These packages provide:
  • GTK3 and WebKit2GTK for the UI
  • AppIndicator for system tray support
  • ALSA development libraries for audio
  • Patchelf for binary patching

Building the Application

Clone the Repository

First, clone the TCP Streamer repository:
git clone https://github.com/NaturalDevCR/TCP-Streamer.git
cd TCP-Streamer

Install Dependencies

Install Node.js dependencies:
npm install
This installs the following key dependencies:
  • @tauri-apps/cli - Tauri command-line interface
  • @tauri-apps/api - Tauri JavaScript API
  • @tauri-apps/plugin-autostart - Auto-start functionality
  • @tauri-apps/plugin-store - Settings persistence
  • vite - Frontend build tool
Rust dependencies are managed automatically by Cargo during the build process.

Development Mode

Run the application in development mode with hot-reload:
npm run tauri dev
This command:
  1. Builds the Rust backend in debug mode
  2. Starts the Vite development server
  3. Launches the application with hot-reload enabled
  4. Watches for file changes in both frontend and backend

Production Build

Build the application for production:
npm run tauri build
This creates optimized binaries in src-tauri/target/release/ and installers in src-tauri/target/release/bundle/.

Platform-Specific Build Output

After building, you’ll find:
  • Application Bundle: src-tauri/target/release/bundle/macos/TCP Streamer.app
  • DMG Installer: src-tauri/target/release/bundle/dmg/TCP Streamer_1.9.0_universal.dmg
The macOS build creates a universal binary supporting both Intel and Apple Silicon.

Rust Dependencies

The Rust backend uses the following key dependencies (defined in src-tauri/Cargo.toml):
  • tauri (v2) - Application framework with tray icon support
  • cpal (v0.15) - Cross-platform audio library for capturing audio
  • ringbuf (v0.3) - Lock-free ring buffer for audio streaming
  • socket2 (v0.5) - Low-level TCP socket operations
  • serde & serde_json - Serialization/deserialization
  • chrono - Date and time handling
  • thread-priority - Thread priority management for reduced jitter
  • tauri-plugin-autostart - Auto-start on system boot
  • tauri-plugin-store - Settings persistence
  • tauri-plugin-single-instance - Single instance enforcement
  • tauri-plugin-log - Logging functionality

Troubleshooting Build Issues

Missing System Libraries (Linux)

If you encounter errors about missing libraries, ensure all platform dependencies are installed:
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev

Rust Toolchain Issues

Update Rust to the latest stable version:
rustup update stable

Node.js Version Issues

Verify you’re using Node.js v18 or later:
node --version
If needed, use nvm to install the correct version:
nvm install 18
nvm use 18

Permission Errors (macOS)

If you get a “damaged app” error after building:
xattr -cr "src-tauri/target/release/bundle/macos/TCP Streamer.app"

Clean Build

If you encounter persistent issues, try a clean build:
# Clean Rust build artifacts
cd src-tauri && cargo clean && cd ..

# Clean Node modules
rm -rf node_modules package-lock.json

# Reinstall and rebuild
npm install
npm run tauri build

Build docs developers (and LLMs) love