|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
⛓️ External projects we rely on
⛓️ External projects we rely on
ascii-chat uses git submodules for vendored dependencies. Get them first:
This fetches uthash, BearSSL, tomlc17, sokol, and libsodium-bcrypt-pbkdf into deps/.
The easiest way to install everything is with the install script:
The script detects your platform and installs all required dependencies using your system's package manager (Homebrew, apt, yum, pacman, or vcpkg).
If you prefer to install manually or the script doesn't work for your system:
Ubuntu/Debian:
Arch Linux:
macOS (Homebrew):
Windows (Scoop + vcpkg):
First, install Visual Studio Build Tools and select the "Desktop development with C++" workload. This provides nmake for building BearSSL.
Once dependencies are installed, you're ready to compile. See Build System for build instructions, or just run:
These tools are required to build ascii-chat from source.
Website: https://clang.llvm.org/
Version: 18.0 or later
ascii-chat is a Clang-only project. We use Clang for:
Website: https://cmake.org/
Version: 4.2 or later
CMake configures the build. We use:
Website: https://ninja-build.org/
Version: Any
Ninja executes the build. Benefits:
Required for ascii-chat to function.
Purpose: Real-time audio capture and playback
Website: http://www.portaudio.com/
License: MIT License
Version: 19.7.0 or later
Used in lib/audio.c and lib/mixer.c for audio streaming. PortAudio abstracts platform differences (WASAPI on Windows, CoreAudio on macOS, ALSA/PulseAudio on Linux).
Purpose: End-to-end encryption and authentication
Website: https://libsodium.org/
License: ISC License
Version: 1.0.18 or later
Powers the cryptographic protocol in lib/crypto/. Provides:
Purpose: Real-time video frame compression
Website: https://facebook.github.io/zstd/
License: BSD License
Version: 1.4.0 or later
Used in lib/compression.c to compress ASCII frames before transmission. Level 1 compression gives ~50% size reduction at 400+ MB/s.
Purpose: UTF-8 string processing and character width calculations
Website: https://github.com/JuliaStrings/utf8proc
License: MIT License
Version: 2.0 or later
Provides Unicode character width calculations for proper terminal display, normalization, and UTF-8 string manipulation.
Purpose: Regular expressions for string validation and parsing
Website: https://www.pcre.org/
License: BSD License
Version: 10.0 or later
Used throughout the codebase for URL validation, session string parsing, SSH crypto format parsing, and protocol validation. Provides performance benefits via JIT compilation.
Purpose: Automatic router port forwarding via UPnP
Website: https://miniupnp.tuxfamily.org/
License: BSD License
Version: 2.3.x (tested with 2.3.2+)
Enables automatic port forwarding on home routers, allowing approximately 70% of home users to establish direct TCP connections without requiring WebRTC fallback. This is an optional dependency - if not available, ascii-chat gracefully falls back to WebRTC for NAT traversal.
Purpose: Real-time audio compression for low-bandwidth transmission
Website: https://opus-codec.org/
License: BSD License
Version: 1.3.0 or later
Enables high-quality bidirectional voice and audio communication between clients with minimal latency and bandwidth overhead. Used in the audio pipeline for encoding outgoing audio and decoding incoming audio.
Purpose: Real-time acoustic echo cancellation for voice chat
Website: https://github.com/nicnacnic/webrtc_AEC3
License: BSD License (WebRTC)
Extracted WebRTC audio processing module providing production-grade acoustic echo cancellation (AEC3). Used in the audio pipeline to remove echo when speakers and microphone are active simultaneously. This is the same AEC technology used by Google Meet, Zoom, Discord, and other major conferencing apps.
Purpose: Media file streaming support
Website: https://ffmpeg.org/
License: LGPL/GPL (depending on configuration)
Version: 4.0 or later
Enables streaming media files (video/audio) instead of live webcam capture. Used for testing, demos, and scenarios where a webcam isn't available.
Purpose: Persistent storage for the discovery service
Website: https://www.sqlite.org/
License: Public Domain
Version: 3.35.0 or later
Used in the ACDS (ascii-chat Discovery Service) to store active sessions, user identities, and connection metadata. Zero-configuration embedded database.
Purpose: NAT traversal via WebRTC DataChannels
Website: https://github.com/paullouisageneau/libdatachannel
License: MPL 2.0
Version: 0.20.0 or later
Lightweight (~50k LOC) WebRTC library providing DataChannels for P2P connections. Enables NAT traversal via ICE/STUN/TURN when UPnP port forwarding is unavailable. Falls back to relay servers for symmetric NAT scenarios.
Purpose: WebSocket protocol for browser-based clients
Website: https://libwebsockets.org/
License: MIT License
Version: 4.3.0 or later
Provides WebSocket server functionality enabling browser clients to connect to ascii-chat servers via standard WebSocket protocol. Bridges the WebSocket transport to the ACIP protocol, allowing web-based clients to participate in video chat sessions alongside native terminal clients.
Included in deps/ and built from source for version consistency.
Purpose: O(1) hash table lookups for client management
Website: https://troydhanson.github.io/uthash/
License: BSD License
Header-only library for hash tables. Used for client ID lookups, symbol caching, and lock tracking.
Purpose: HTTPS client for fetching public keys from GitHub/GitLab
Website: https://bearssl.org/
License: MIT License
Small (~100KB) SSL library used in lib/crypto/http_client.c. Much smaller and simpler than OpenSSL.
Purpose: Configuration file parsing (future feature)
Website: https://github.com/cktan/tomlc17
License: MIT License
Prepared for ~/.ascii-chat/config.toml support.
Purpose: Future GPU-accelerated rendering
Website: https://github.com/floooh/sokol
License: zlib/libpng License
Header-only library for graphics, audio, and input. Available for future use.
Purpose: OpenSSH private key decryption
Website: https://github.com/imaami/libsodium-bcrypt-pbkdf
License: BSD License
Implements bcrypt-pbkdf for decrypting password-protected SSH keys.
Only required for building and running tests.
Purpose: Unit, integration, and performance testing
Website: https://criterion.readthedocs.io/
License: MIT License
Version: 2.4.0 or later
Platform: POSIX only (Linux, macOS). Windows tests run via Docker.
Provides automatic test discovery, fixtures, parameterized tests, and JUnit XML output for CI.
Optional for development, but required for portable static release builds.
Purpose: Fully static executables with no glibc dependencies
Website: https://musl.libc.org/
License: MIT License
Platform: Linux only
musl enables building fully static executables that run on any Linux distribution without shared library dependencies. Used with -DUSE_MUSL=ON.
Purpose: Fast memory allocation for production builds
Website: https://github.com/microsoft/mimalloc
License: MIT License
Version: 2.0.0 or later
Up to 2x faster than system malloc. Enabled with -DUSE_MIMALLOC=ON and used by default in release builds.
ascii-chat uses native platform APIs for webcam access and terminal I/O, eliminating heavy dependencies like OpenCV.
Video Capture:
Terminal I/O:
All dependencies use permissive licenses compatible with ascii-chat:
| License | Dependencies |
|---|---|
| MIT | BearSSL, PortAudio, Criterion, mimalloc, musl, tomlc17, utf8proc, libwebsockets |
| ISC | libsodium |
| BSD | zstd, uthash, libsodium-bcrypt-pbkdf, miniupnpc, Opus, WebRTC AEC3, PCRE2 |
| zlib | sokol |
| Apache 2.0 | Abseil |
| MPL 2.0 | libdatachannel |
| LGPL/GPL | FFmpeg |
| Public Domain | SQLite3 |
FFmpeg license depends on configuration; ascii-chat uses LGPL-compatible features.
| Dependency | Minimum | Rationale |
|---|---|---|
| CMake | 4.2 | CMake Presets, modern features |
| Clang | 18.0 | C23, sanitizers, defer/panic tools |
| PortAudio | 19.7.0 | Stable callback API |
| libsodium | 1.0.18 | Ed25519 support |
| zstd | 1.4.0 | Streaming API |
| utf8proc | 2.0 | UTF-8 string processing |
| PCRE2 | 10.0 | Regular expression support |
| Opus | 1.3.0 | Stable audio codec API |
| FFmpeg | 4.0 | Stable libav API |
| SQLite3 | 3.35.0 | Returning clause support |
| libdatachannel | 0.20.0 | WebRTC DataChannels |
| libwebsockets | 4.3.0 | WebSocket protocol support |
| miniupnpc | 2.3.x | UPnP IGD client (API changes in 2.3) |
| Criterion | 2.4.0 | Theories and fixtures |
Git submodules are pinned to specific commits for reproducibility.
Git Submodules:
System Libraries:
Criterion is POSIX-only. Run tests via Docker:
BearSSL requires a native build tool:
make is installed (apt install build-essential or brew install make)nmake from Visual Studio Build Tools (install from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)