Installation & Setup
Relevant source files
The following files were used as context for generating this wiki page:
ComChan is a high-performance serial monitor designed for embedded systems, featuring real-time plotting and 3D telemetry visualization. The installation process is flexible, offering methods via Rust's package manager cargo, OS-specific repositories like AUR for Arch Linux, or direct binary installation.
The setup involves configuring serial parameters (baud rate, data bits, parity) and optionally enabling advanced features like Bluetooth Low Energy (BLE) or hardware-accelerated 3D support (Ratty). Users can manage these settings through command-line arguments or a persistent comchan.toml configuration file.
Sources: README.md:1-25, src/config.rs:88-112
Installation Methods
Package Managers and Binaries
ComChan is primarily distributed via crates.io. Users can choose between a standard installation or one with additional feature flags for BLE and 3D support.
| Method | Command / Source | Notes |
|---|---|---|
| Cargo (Standard) | cargo install comchan | Uses Standard Braille Engine |
| Cargo (Full) | cargo install comchan --features ratty,ble | Adds 3D (Ratty) and BLE |
| Binstall | cargo binstall comchan | Includes ratty and ble by default |
| AUR (Arch) | yay -S comchan or comchan-ratty | Maintained by community |
| Elda | `elda i https://github.com/.../ComChan%60 | Alternative installer |
Sources: README.md:31-72, Cargo.toml:16-18
Building From Source
For developers or those requiring the latest features, the project can be built directly from the GitHub repository.
git clone https://github.com/Vaishnav-Sabari-Girish/ComChan.git
cd ComChan
cargo build --release --features ble,ratty
Sources: README.md:83-91, Grimoire.toml:9-12
Configuration and Environment Setup
ComChan uses a multi-layered configuration system. It searches for a comchan.toml file in specific platform-dependent directories, which can be overridden by CLI arguments.
Configuration Hierarchy
- CLI Arguments: Highest priority, overrides all other settings.
- Local Config:
comchan.tomlin the current working directory. - Global Config: Platform-specific configuration directory.
- Defaults: Hardcoded fallback values.
The following flowchart illustrates the configuration loading logic:
The application resolves settings into a MergedConfig struct used throughout the runtime.
Sources: src/config.rs:258-290, src/config.rs:328-356
Platform-Specific Paths
ComChan adheres to standard OS conventions for storing configuration files.
| Platform | Default Configuration Path |
|---|---|
| Windows | %APPDATA%\comchan\comchan.toml |
| macOS | ~/Library/Application Support/comchan/comchan.toml |
| Linux/Unix | ~/.config/comchan/comchan.toml |
Sources: src/config.rs:218-234, src/config.rs:309-315
Task Runner (Grimoire)
ComChan integrates Grimoire as a task runner to simplify build and installation workflows. It provides interactive prompts for feature selection.
Available Spells (Tasks)
grim cast build: Compiles the project with interactive feature selection (default,ratty,ble, or both).grim cast install: Installs the binary to~/.cargo/bin/.grim cast run --simulate: Runs the application in simulation mode for testing without hardware.grim cast clean: Removes build artifacts viacargo clean.
Sources: README.md:98-125, Grimoire.toml:1-55
Feature Flags and Dependencies
The project architecture is modular, controlled by Rust features defined in Cargo.toml.
| Feature | Description | Key Dependencies |
|---|---|---|
ble | Enables Bluetooth Low Energy streaming. | btleplug, inquire, tokio |
ratty | Hardware-accelerated 3D rendering support. | ratatui-ratty |
std | Standard library support (enabled by default). | ratatui/layout-cache |
Sources: Cargo.toml:16-18, crates/ratatui-wireframe/Cargo.toml:16-18
Summary
Setting up ComChan requires choosing an installation path—via Cargo for standard users or Grimoire for developers—and optionally configuring a comchan.toml file. The system's ability to merge file-based configurations with dynamic CLI arguments ensures a flexible environment for both simple serial monitoring and complex 3D telemetry visualization.
Sources: README.md:200-220, src/config.rs:328-356