๐ง MemoBuild Engine
High-Performance Incremental Build System with Smart Caching
MemoBuild is a next-generation build system that intelligently rebuilds only what's changed, using advanced dependency tracking, multi-layer caching, and OCI-compatible image generation.
๐ Read the Vision | ๐ Technical Whitepaper | ๐ป CLI Manual | ๐ CI/CD Integration
๐๏ธ Architecture Overview
MemoBuild transforms container builds from linear execution โ dependency graph execution.
๐ Quick Start
1. Installation
# Clone the repository
# Build and install locally
2. Basic Usage
# Build current directory
# Build and push to registry
3. Remote Cache Sharing (Optional)
# Start the Remote Cache Server
# Client: Share artifacts across the team
๐ Examples
Visit the examples/ directory to see ready-to-use projects:
- Node.js App: Simple web server with dependency caching.
- Rust App: High-performance async app showing complex build caching.
๐ Documentation Reference
- Vision: The philosophy and problem statement.
- Whitepaper: Deep technical spec and mathematical foundations.
- CLI Reference: Detailed command and option manual.
- Architecture Diagram: Visual process flow.
- CI/CD Integration: Blueprint for GitHub Actions, GitLab, and cloud runners.
โจ Features
- BLAKE3 Hashing: Ultra-fast content hashing for change detection.
- Tiered Smart Cache: Multi-layer (In-memory, Local, Remote) sharing.
- DAG Execution: Parallelized rebuild of affected subgraphs only.
- OCI Compliance: Push directly to any standard container registry.
- K8s Helper: Generate native Kubernetes Job manifests for cloud builds.
๐ Core Components
1. Change Detector (src/core.rs)
- BLAKE3-based file hashing
- Directory tree hashing
- Dependency-aware hash computation
- Dirty flag propagation
2. Graph Builder (src/graph.rs)
- Dockerfile โ DAG conversion
- Node types: Source, Build, Artifact, Dependency
- Topological sorting
- Dependency management
3. Hybrid Cache System (src/cache.rs)
- Tiered caching (L1 In-memory, L2 Local, L3 Remote)
- Content-addressed artifact storage (CAS)
- Gzip compression for artifacts
4. OCI Image Exporter (src/oci/mod.rs)
- OCI-compliant manifest and config generation
- Layer digest calculation
- Registry push/pull using Distribution Spec
๐งช Testing
# Run all tests
# Run with verbose output
# Run specific test
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
MIT License - see LICENSE file for details
MemoBuild - Smart builds, faster deployments ๐