Compile MemCP from Source: Difference between revisions
(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") |
Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference) |
||
| Line 1: | Line 1: | ||
<!-- 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. | |||
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 == | |||
Run | MemCP requires '''Go 1.24 or newer''', GNU Make, and Git. Optional Ceph/RADOS support additionally requires the RADOS development headers. | ||
== Build and test == | |||
<syntaxhighlight lang="bash"> | |||
git clone https://github.com/launix-de/memcp | |||
cd memcp | |||
go mod download | |||
make | |||
make test | |||
</syntaxhighlight> | |||
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 == | |||
<syntaxhighlight lang="bash"> | |||
./memcp --api-port=4321 --mysql-port=3307 lib/main.scm | |||
</syntaxhighlight> | |||
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]]. | |||
Revision as of 11:59, 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
<syntaxhighlight lang="bash"> git clone https://github.com/launix-de/memcp cd memcp go mod download make make test </syntaxhighlight>
The test command builds ./memcp and runs the Scheme unit tests and SQL YAML integration suites. Planner changes must also respect INVARIANTS.md.
Run
<syntaxhighlight lang="bash"> ./memcp --api-port=4321 --mysql-port=3307 lib/main.scm </syntaxhighlight>
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.