
Build Memo from the repository. This guide covers Go backend compilation, Flutter frontend build, CGO requirements, and packaging for distribution.
| Tool | Version | Purpose |
|---|---|---|
| Go | 1.26+ | Backend compiler |
| Flutter | 3.10+ | Frontend framework |
| GCC / Clang | Any recent | CGO compilation (sqlite-vec) |
| CMake | 3.20+ | sqlite-vec build |
| Git | Any recent | Clone the repository |
git clone https://github.com/BugraAkdemir/memo.git
cd memo
SQLite and sqlite-vec require CGO enabled:
export CGO_ENABLED=1
For cross-compilation or custom toolchains, configure the C compiler:
export CC=gcc # Linux
export CC=x86_64-w64-mingw32-gcc # Cross-compile for Windows from Linux
go mod download
Key dependencies include:
| Package | Purpose |
|---|---|
modernc.org/sqlite |
Pure-Go SQLite (where no CGO needed) |
github.com/ncruces/go-sqlite3 |
CGO SQLite with vec0 extension |
golang.org/x/net |
HTTP, HTML parsing (web search tool) |
google.golang.org/api |
Google Drive OAuth2 |
go.mau.fi/whatsmeow |
WhatsApp Web bridge |
CGO_ENABLED=1 go build -o memo .
The output is a single binary memo (~40 MB) containing the full backend.
go test ./... -race -count=1 -timeout 60s
cd frontend
flutter pub get
flutter build linux --release
The Flutter build outputs to frontend/build/linux/x64/release/bundle/.
# Windows (from Windows or cross-compile)
flutter build windows --release
# macOS
flutter build macos --release
# Android (companion app)
flutter build apk --release
# iOS (requires macOS)
flutter build ios --release
cd frontend
flutter analyze lib/
flutter test
The sqlite-vec (vec0) extension is compiled from C source during the Go build. If you encounter build errors:
# Ensure sqlite3 dev headers are available
# Debian/Ubuntu
sudo apt install libsqlite3-dev
# Fedora
sudo dnf install sqlite-devel
# macOS
brew install sqlite
# Clean and rebuild
go clean -cache
CGO_ENABLED=1 go build -o memo .
Thesqlite-veclibrary targetsvec0— a virtual table extension for approximate nearest neighbor (ANN) vector search using quantization. It is not bundled as a separate binary; it's embedded in the Go binary via CGO.
The repository includes build_releases.sh for creating distributable packages:
./build_releases.sh
This script:
llama-server and vec0 engine binaries| Format | Platform | Contents |
|---|---|---|
.exe |
Windows | NSIS installer with bundled dependencies |
.AppImage |
Linux (universal) | Self-contained AppImage |
.deb |
Debian/Ubuntu | dpkg package |
.tar.gz |
Linux portable | Standalone directory |
.zip |
macOS | Universal .app bundle |
.apk |
Android | Flutter companion app |
The packaging script for Linux uses:
# AppImage - uses linuxdeploy with AppImage plugin
linuxdeploy --appdir AppDir --plugin gtk --output appimage
# .deb - standard dpkg-deb
dpkg-deb --build memo-deb
# .tar.gz - simple archive
tar -czf Memo-linux-x64-v3.1.2-beta.tar.gz memo/
Windows packaging requires:
# From Linux with MinGW cross-compiler
CC=x86_64-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows go build -o memo.exe .
# Flutter
flutter build windows --release
# Package with NSIS
makensis memo-installer.nsi
Before publishing a release:
go test ./... -race passes on all target platformsflutter analyze lib/ passesflutter test passesllama-server and vec0 binaries are bundled and version-matchedversionNoteEN.md, versionNoteTR.md) are updatedmemo.bugradev.com is updatedGitHub Actions workflows (ci.yml) run on every push to main:
For the CI configuration, see .github/workflows/ in the repository.