Maul Tween

Easing, springs, tweens and timelines in C, driven by the host's clock, with no dependencies and the same results on every platform.

CI License: MIT Release OpenSSF Scorecard

Interfaces move: a button lifts on hover and settles back when the pointer leaves halfway, a list scrolls on after a fling and bounces at its end, a card's parts slide in one after another, a character breathes while a hit plays over it. Each needs a curve, a value that knows how fast it is moving, and a clock the program controls.

Maul Tween gives games, engines and applications:

The values layer needs no setup and allocates nothing. Everything else lives in one context the host creates with its own allocator and fixed capacities; nothing is allocated after that, an update allocates nothing, and the library starts no thread but can run its players on the host's task system.

Quick start

It builds with CMake 3.25 or newer and GCC 14 or newer, Clang 19 or newer, or Apple Clang. Ubuntu 24.04's default compiler is GCC 13, which the build refuses, so there install GCC 14, with Git and CMake, and tell CMake to use it:

sudo apt install git cmake gcc-14
export CC=gcc-14

Then, on Linux and macOS:

git clone https://github.com/Rawframe-Project/maul-tween.git
cd maul-tween
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build
./build/sample_button

A build/ that GCC 13 already configured keeps that compiler and fails again ("GCC 14 or newer is required"). Remove it and configure again, with CC exported as above, then carry on with the rest of the block from cmake --build build:

rm -rf build && cmake -B build -DCMAKE_BUILD_TYPE=Release

On Windows the library builds with clang-cl, and on the web with Emscripten; Getting started lists what each needs.

Install it with cmake --install build --prefix <prefix> and use it from CMake:

find_package(maul-tween REQUIRED CONFIG)
target_link_libraries(app PRIVATE maul-tween::maul-tween)

or through pkg-config as maul-tween. Getting started covers the model the API follows.

Platforms

Linux with GCC 14 or Clang 19 and newer on x86-64, 32-bit x86 (with SSE2 arithmetic) and AArch64, macOS with Apple Clang, Windows with clang-cl, and WebAssembly with Emscripten; CI builds and tests each. The public headers are C17 and C++17, so any C or C++ program can include them.

Documentation

Maul Tween belongs to the Maul family of standalone C libraries, which share one set of conventions.

Contributing

Issues are welcome. Pull requests are accepted for issues a maintainer has approved; see CONTRIBUTING.md. The project is developed with AI coding agents, directed and reviewed by its maintainers; outside contributions follow the AI policy.

License

MIT; see LICENSE.