Compile MemCP from Source: Difference between revisions

From MemCP
Jump to navigation Jump to search
(Created page with "Make sure, <code>go</code> is installed on your computer. (at least 1.22.0) Compile the project with: git clone <nowiki>https://github.com/launix-de/memcp</nowiki> cd memcp make Run the engine with: ./memcp")
 
(Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Make sure, <code>go</code> is installed on your computer. (at least 1.22.0)
<!-- Copyright (C) 2026 Carl-Philip Haensch -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
= Compile MemCP from Source =


Building from source is the recommended path for development, debugging, unreleased planner work, and installations that need optional build variants such as Ceph/RADOS or the native JIT. A source build produces the <code>memcp</code> executable, but a working installation also needs the matching <code>lib/</code> Scheme modules and, where used, the accompanying assets.


Compile the project with:
Use a supported Go toolchain and build from a specific release tag or recorded commit so the binary and runtime libraries remain reproducible. Run the complete test suite before deploying a locally built executable, especially after changing storage formats, transaction behavior, SQL parsing, or query planning.
git clone <nowiki>https://github.com/launix-de/memcp</nowiki>
 
cd memcp
== Requirements ==
make
 
Run the engine with:
MemCP requires '''Go 1.24 or newer''', GNU Make, and Git. Optional Ceph/RADOS support additionally requires the RADOS development headers.
./memcp
 
== Build and test ==
 
<pre>
git clone https://github.com/launix-de/memcp
cd memcp
go mod download
make
make test
</pre>
 
The test command builds <code>./memcp</code> and runs the Scheme unit tests and SQL YAML integration suites. Planner changes must also respect <code>INVARIANTS.md</code>.
 
== Run ==
 
<pre>
./memcp --api-port=4321 --mysql-port=3307 lib/main.scm
</pre>
 
When no Scheme file is supplied, MemCP searches the working directory, executable directory, <code>/usr/local/lib/memcp</code>, and <code>/usr/lib/memcp</code> for <code>lib/main.scm</code>. Background services must use <code>--no-repl</code>. See [[Deployment]] and [[Security and Authentication]].

Latest revision as of 12:13, 28 August 2026

Compile MemCP from Source

Building from source is the recommended path for development, debugging, unreleased planner work, and installations that need optional build variants such as Ceph/RADOS or the native JIT. A source build produces the memcp executable, but a working installation also needs the matching lib/ Scheme modules and, where used, the accompanying assets.

Use a supported Go toolchain and build from a specific release tag or recorded commit so the binary and runtime libraries remain reproducible. Run the complete test suite before deploying a locally built executable, especially after changing storage formats, transaction behavior, SQL parsing, or query planning.

Requirements

MemCP requires Go 1.24 or newer, GNU Make, and Git. Optional Ceph/RADOS support additionally requires the RADOS development headers.

Build and test

git clone https://github.com/launix-de/memcp
cd memcp
go mod download
make
make test

The test command builds ./memcp and runs the Scheme unit tests and SQL YAML integration suites. Planner changes must also respect INVARIANTS.md.

Run

./memcp --api-port=4321 --mysql-port=3307 lib/main.scm

When no Scheme file is supplied, MemCP searches the working directory, executable directory, /usr/local/lib/memcp, and /usr/lib/memcp for lib/main.scm. Background services must use --no-repl. See Deployment and Security and Authentication.