Start

Build from source

Compile Sofuu and its QTSQ memory archive from source on macOS and Linux, then run the health check and test suite.

Updated Nov 13, 20262 min readv0.3.0-beta
On this page6 sections

A source build compiles the runtime against the QTSQ memory codec, which Sofuu links as a core dependency. The process has two stages: build the QTSQ static archive, then build Sofuu with SOFUU_QTSQ_DIR pointing at it.

Prerequisites

RequirementDetail
Rust and Cargo1.80 or newer. Install through rustup if it is not already present.
C and C++ toolchainclang or gcc, plus cmake and make
macOS headersXcode Command Line Tools: xcode-select --install
Linux headerssudo apt-get install -y zlib1g-dev libcurl4-openssl-dev libssl-dev on Ubuntu, Debian, or AWS Linux

The Linux package list covers zlib, libcurl, and OpenSSL development headers. A build that stops while linking one of those libraries usually means the corresponding package is missing.

If Rust is not installed, install it through rustup:

Shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Build the QTSQ archive

Sofuu links libqtsq.a statically. Clone the codec, build it, and export its directory:

Shell
git clone https://github.com/haruhito2666/qtsq ~/projects/qtsq
cd ~/projects/qtsq
make
export SOFUU_QTSQ_DIR=$(pwd)

SOFUU_QTSQ_DIR must point at the directory that contains the archive produced by make. Export it in the same shell you use for the Sofuu build; a new terminal does not inherit it.

Build Sofuu

Shell
git clone https://github.com/sofuu-runtime/sofuu ~/projects/sofuu
cd ~/projects/sofuu
make deps
SOFUU_QTSQ_DIR=$SOFUU_QTSQ_DIR make

make deps builds the vendored libuv. The SOFUU_QTSQ_DIR=$SOFUU_QTSQ_DIR make command builds the release binary and links the QTSQ archive. The resulting sofuu executable is in the repository root.

Build the codec

Run make inside the QTSQ checkout and export SOFUU_QTSQ_DIR.

Build the runtime

Run make deps, then SOFUU_QTSQ_DIR=$SOFUU_QTSQ_DIR make inside the Sofuu checkout.

Verify the binary

Run ./sofuu doctor and confirm the memory linkage and round-trip checks pass.

Run the test suite

Run make test before reporting a build-specific failure.

Verify and test

Shell
./sofuu doctor
make test

doctor verifies QTSQ memory linkage, a round-trip write and recall, and context limits. make test runs the repository test suite. If doctor fails on a fresh build, check that SOFUU_QTSQ_DIR was set for the build command, not only for the codec build.

Build constraints

The QTSQ archive is linked in, but the resulting executable still uses operating system libraries such as libcurl and libssl, and model-backed workflows need a model file or a provider. A source build is not a claim that every workflow runs without external dependencies.

Published builds cover macOS arm64 and Linux x86_64 and arm64. Building on another target depends on the toolchain and the libraries available there; it is not covered by the published artifact matrix.

Where to go next