Tessera
Tessera is a cross-platform C++17 math expression parser, evaluator, and visualizer. Hand-written parser, AST, and evaluator — no shortcuts. Built with CMake, tested with Catch2 and CTest, cross-platform CI on macOS, Linux, and Windows. GPL-3.0.
Tessera — Project Description
Tessera is a cross-platform, open-source application for parsing, evaluating, and visualizing mathematical expressions. Written in modern C++17 and built with CMake, it is designed to grow from a simple command-line calculator into a full-fledged mathematical workbench with a graphical interface, matrix and vector support, function plotting, and physics simulations.
At its core, Tessera reads a mathematical expression as plain text, transforms it into a structured tree of operations, and computes the result. Behind this apparently simple workflow lies a carefully designed, layered architecture that separates concerns, keeps the code testable, and makes the project easy to extend. The three conceptual layers — text analysis, syntactic parsing, and evaluation — are strictly independent. Each layer can be tested in isolation, replaced without touching its neighbors, or reused in other projects.
The project is built on the principle that understanding comes before abstraction. Every part of the codebase is written by hand, without shortcuts, without borrowed implementations, and without third-party dependencies in the core library. The parser is a hand-written recursive descent parser. The tree is a hand-written AST. The evaluator is a hand-written tree walker. This approach may seem slower than pulling a ready-made library from the internet, but it produces something far more valuable: a deep understanding of how compilers and interpreters actually work, and a codebase that its author can explain line by line.
Tessera targets three operating systems with equal priority: macOS, Linux, and Windows. Every feature is required to build and pass tests on all three platforms through continuous integration. The build system uses CMake with CMake Presets, ensuring that a contributor on any platform runs the same commands and gets the same result. Dependency management is handled through `FetchContent`, so the test framework, the GUI library, and any future dependencies are downloaded and built automatically — no manual setup required.
The test suite is not an afterthought but a first-class citizen. Every behavior is specified by tests written before the implementation, following the Red → Green → Refactor cycle of test-driven development. The tests run under CTest, are checked under AddressSanitizer and UndefinedBehaviorSanitizer to catch memory errors and undefined behavior, and are validated with -Werror in the strict CI configuration. Coverage is measured and tracked. A pull request is not merged until every test passes on every platform under every configuration.
The public API of the core library is intentionally minimal. It exposes a small number of well-named types and functions, hides all implementation details behind private members, and follows the C++ Core Guidelines: no raw owning pointers, no manual memory management, no using namespace std; in headers, and #pragma once everywhere. Every source file carries an SPDX license header. Every public symbol lives in a namespaced scope. Every commit follows Conventional Commits, and every release follows Semantic Versioning.
Tessera is open-source and licensed under the GNU General Public License v3.0 or later. It welcomes contributions from anyone who shares its philosophy: writing code by hand, learning deeply, and building software that can be understood, not just used. The repository is protected by a code of conduct, a security policy, and a contributing guide. Pull requests go through review, CI, and squash-merge. The main branch is protected and always releasable.
Looking forward, the roadmap includes several planned versions. Version 0.1 delivers the core parser, evaluator, and interactive REPL. Version 0.2 adds matrix and vector operations with visual feedback. Version 0.3 introduces a graphical interface built on raylib and Dear ImGui, turning the command-line tool into a real windowed application. Version 0.4 adds function plotting with ImPlot, allowing users to type y = x^2 and see the curve in real time. Version 0.5 brings in a physics module with kinematics, dynamics, and other simulations. Version 0.6 introduces complex numbers and operations on the complex plane. Version 1.0 marks the first stable public release.
Long term, Tessera aims to become a learning tool for students of mathematics, physics, and computer science — a place where an expression is not just evaluated, but shown. Where a function is not just called, but visualized. Where a formula is not just typed, but understood. The project is a bridge between the abstract world of mathematical notation and the concrete world of pixels, motion, and interactive feedback.
Every line of Tessera is written by someone who is learning. That is not a weakness — it is the point. The project exists to prove that a well-structured, well-tested, cross-platform C++ application can be built from scratch, by one person, one test at a time, one commit at a time, without shortcuts and without excuses. Tessera is not just a calculator. It is a statement: that careful engineering and genuine understanding still matter, and that the best way to learn how software works is to build it yourself.