High-performance C++ storage server for the Lux Session network with GPU acceleration.
This is the C++ implementation of the Session storage server, designed for high-throughput message storage and retrieval with post-quantum cryptographic security. It provides the backend infrastructure for the SessionVM ecosystem.
- High Performance: Optimized C++ implementation with GPU acceleration
- Post-Quantum Crypto: ML-KEM-768 and ML-DSA-65 via luxcpp/crypto
- GPU Acceleration: Metal (Apple), CUDA (NVIDIA), WebGPU support
- CGO Bindings: Seamless integration with Go applications
- Swarm Architecture: Distributed storage across service nodes
- CMake >= 3.16
- C++20 compatible compiler
- OpenSSL >= 1.1.1
- libsodium >= 1.0.17
- pkg-config
- libcurl
- jemalloc (recommended)
git submodule update --init --recursive
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallelcmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_CGO_LIB=ON
cmake --build build --parallelThis produces libsession_cgo.a for Go integration.
# Metal (macOS)
cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_METAL=ON
cmake --build build --parallel
# CUDA (Linux/Windows)
cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=ON
cmake --build build --parallel┌─────────────────────────────────────────────────────────┐
│ luxcpp/session │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ daemon/ │ │ server/ │ │ storage/ │ │
│ │ parsd │ │ HTTPS/QUIC │ │ SQLite │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ snode/ │ │ rpc/ │ │ crypto/ │ │
│ │ Swarm │ │ Endpoints │ │ PQ Adapter │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────┘
│
┌─────────────────────────▼───────────────────────────────┐
│ luxcpp/crypto │
│ ┌────────────┐ ┌────────────┐ ┌──────────────────┐ │
│ │ ML-KEM │ │ ML-DSA │ │ GPU Accel │ │
│ │ 768 │ │ 65 │ │ Metal/CUDA │ │
│ └────────────┘ └────────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────────┘
The storage server can be linked into Go applications:
// #cgo LDFLAGS: -L${SRCDIR}/lib -lsession_cgo
// #include "session_cgo.h"
import "C"
func StoreMessage(sessionID string, data []byte) error {
// Call C++ storage backend
}session/
├── cmake/ # CMake modules
├── contrib/ # Scripts and utilities
├── external/ # External dependencies
├── include/ # Public headers (CGO)
├── pars/ # Pars-specific integration
│ ├── crypto/ # PQ crypto adapter
│ ├── daemon/ # parsd daemon
│ └── rpc/ # Lux RPC endpoints
├── session/
│ ├── common/ # Common types
│ ├── crypto/ # Channel encryption
│ ├── daemon/ # Storage daemon
│ ├── http/ # HTTP client
│ ├── logging/ # Logging
│ ├── rpc/ # RPC endpoints
│ ├── server/ # HTTPS/QUIC/OMQ servers
│ ├── snode/ # Service node logic
│ ├── storage/ # SQLite storage
│ └── utils/ # Utilities
├── src/ # CGO source
└── unit_test/ # Unit tests
- luxfi/session - Go SessionVM implementation
- luxcpp/crypto - C++ cryptographic primitives
- luxcpp/gpu - GPU acceleration framework
- luxcpp/metal - Metal shaders (Apple)
- luxcpp/cuda - CUDA kernels (NVIDIA)
- parsdao/node - Pars blockchain node
# Build and run unit tests
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
cmake --build build --parallel
cd build && ctest --output-on-failure
# Network integration tests
cd network-tests
pytest -v- luxcpp.github.io - C++ Libraries Documentation
- LIP-7001 - DAO Governance Standard
Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved. See LICENSE for details.