Lux C++ π§
High-Performance C++ Libraries for Lux Network
Native C++ implementations for cryptography, FHE, and blockchain components with maximum performance.
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Lux C++ Stack β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ¬ββββββββββββββ¬ββββββββββββββ¬ββββββββββββββ β
β β liblux β libluxfhe β libluxcryptoβ luxvm β β
β β (Core) β (FHE) β (Crypto) β (VM) β β
β βββββββββββββββ΄ββββββββββββββ΄ββββββββββββββ΄ββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β LLVM-based Compilation β β
β β Python β’ Rust β’ Go β’ Ruby β’ Elixir β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Hardware Acceleration β β
β β CUDA β’ ROCm β’ Metal β’ AVX-512 β’ NEON β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ Repositories
Core Libraries
| Repository | Description | Status |
|---|---|---|
| liblux | Core Lux library | β Stable |
| libluxfhe | FHE operations | β Stable |
| libluxcrypto | Cryptographic primitives | β Stable |
| luxvm | Virtual machine | π§ Beta |
Acceleration
| Repository | Description | Status |
|---|---|---|
| luxaccel | GPU acceleration | β Stable |
| luxntt | NTT implementations | β Stable |
| luxfft | FFT implementations | β Stable |
Bindings
| Repository | Description | Status |
|---|---|---|
| luxpy | Python bindings | β Stable |
| luxrs | Rust bindings | β Stable |
| luxgo | Go bindings (CGO) | β Stable |
π Quick Start
Build from Source
git clone https://github.com/luxcpp/liblux cd liblux mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release make -j$(nproc) sudo make install
Use in CMake Project
find_package(luxfhe REQUIRED) target_link_libraries(myapp luxfhe::luxfhe)
C Example
#include <luxfhe.h> luxfhe_context_t* ctx = luxfhe_init(); luxfhe_keygen(ctx); luxfhe_ciphertext_t* ct = luxfhe_encrypt_u64(ctx, 42); // Compute on encrypted data... luxfhe_destroy(ctx);
C++ Example
#include <luxfhe.hpp> auto ctx = luxfhe::Context::create(); ctx->keygen(); auto ct = ctx->encrypt(42); auto result = ct + ctx->encrypt(8); std::cout << ctx->decrypt<uint64_t>(result); // 50
π§ Build Requirements
- CMake 3.20+
- C++20 compiler (GCC 12+, Clang 15+, MSVC 2022+)
- Optional: CUDA 12+, ROCm 5+, Metal
π Related Organizations
| Organization | Focus | Link |
|---|---|---|
| Lux C++ | C++ implementations | github.com/luxcpp |
| Lux Network | Go implementations | github.com/luxfi |
| Lux FHE | Docs & examples | github.com/luxfhe |
| Hanzo AI | AI infrastructure | github.com/hanzoai |
π License
Apache 2.0 - See individual repositories for details.
Part of the Lux Network ecosystem