Skip to content

mxreal64/mux

Repository files navigation

mux

A blazing-fast, bare-metal Markdown compilation engine and text viewer built entirely inside the terminal. No Electron. No Chromium bloat. Zero browser engine overhead.

mux processes text streams via a low-latency, single-pass memory scanner and renders visual structures instantly in a modern terminal framework—consuming less than 10MB of RAM at runtime.


Core Highlights

  • Pure C++26 Architecture: Written using cutting-edge C++ Named Modules (import std;), eliminating legacy macro headers and drastically isolating dependencies.
  • Instantaneous Evaluation Engine: A custom AST token pipeline parses text buffers character-by-character as you type.
  • Dual-View UI Router: Interactive fullscreen tab routing allows developers to swap between focused editing and visual output instantly without keyboard conflicts.
  • Bare-Metal Resource Efficiency: Yields a 98%+ reduction in memory and disk footprint compared to classic web-hybrid editors.

Keyboard Interface Layout

  • Ctrl + T : Toggle screen views instantly (Editor Mode $\longleftrightarrow$ Fullscreen Preview Mode).
  • Ctrl + S : Intercepts layout focus to open a dynamic filename input prompt for committing buffers directly to disk.
  • Ctrl + Q : Force-exits application event loops and cleans terminal screen registers safely.
  • Ctrl + F : Find/Replace

Build and Compilation Pipeline

mux bypasses heavy, bloated build system tools like CMake. You can compile the full modular dependency tree directly from your shell layout using a recent GCC (14/15/16+) or Clang compiler toolchain.

1. Build the Standard Module Cache

Because GCC doesn't ship pre-compiled system binaries for modules out of the box, generate your system's std.gcm cache folder exactly once:

g++ -std=c++26 -fmodules-ts -c /usr/include/c++/16.1.1/bits/std.cc

2. Compile Project Modules

# Compile core lexical parsing token engine
g++ -std=c++26 -fmodules-ts -c MuxParser.cppm -o build/MuxParser.o

# Compile high-performance interface workspace module
g++ -std=c++26 -fmodules-ts -c TerminalWorkspace.cppm -o build/TerminalWorkspace.o $(pkg-config --cflags ftxui)

3. Bind Target Application Executable

g++ -std=c++26 -fmodules-ts main.cpp build/MuxParser.o build/TerminalWorkspace.o $(pkg-config --libs ftxui) -o build/Mux

4. Execute mux

./build/Mux

Project Tree Structure

Mux/
├── build/                # Local compiled object binaries (git-ignored)
├── main.cpp              # Application system entry point
├── MuxParser.cppm        # Core single-pass text engine module
├── TerminalWorkspace.cppm # Interface state router and event framework module
├── .gitignore            # Keeps deployment pipelines clean
└── README.md             # Core project specification file

// Copyright (C) 2026 mxreal64 // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see https://gnu.org.

About

A blazing-fast, bare-metal Markdown engine and TUI built with pure C++26 modules. Zero browser engine overhead, zero Electron bloat. pretty cool, right?

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages