Compile MemCP from Source: Difference between revisions
Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference) |
Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference) |
||
| Line 13: | Line 13: | ||
== Build and test == | == Build and test == | ||
< | <pre> | ||
git clone https://github.com/launix-de/memcp | git clone https://github.com/launix-de/memcp | ||
cd memcp | cd memcp | ||
| Line 19: | Line 19: | ||
make | make | ||
make test | 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>. | 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>. | ||
| Line 25: | Line 25: | ||
== Run == | == Run == | ||
< | <pre> | ||
./memcp --api-port=4321 --mysql-port=3307 lib/main.scm | ./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]]. | 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.