npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nenco/nendb-native

v0.2.2-beta

Published

NenDB Native version - High-performance graph database with static memory allocation

Readme

🚀 NenDB - AI-Native Graph Database

Lightning-fast graph database built with Data-Oriented Design (DOD) for AI workloads

Zig License Version Docker DOD

📦 Package Structure

NenDB is available as focused packages so you can install only what you need.

🌐 @nenco/nendb-wasm - WebAssembly (browser / Node / Bun)

# NPM
npm install @nenco/nendb-wasm
# shorthand
npm i @nenco/nendb-wasm

# Bun (recommended)
bun add @nenco/nendb-wasm
  • CLI: npx nendb-wasm help or bunx nendb-wasm help

🖥️ @nenco/nendb-native - Native (server)

# NPM
npm install @nenco/nendb-native
# shorthand
npm i @nenco/nendb-native

# Bun (recommended)
bun add @nenco/nendb-native
  • CLI: npx nendb-create help or bunx nendb-create help

Use the WASM package for browser/edge environments and the native package for high-performance server deployments.

🎯 What is NenDB?

NenDB is a Data-Oriented Design (DOD) graph database built specifically for AI applications. Using Struct of Arrays (SoA) layout, component-based architecture, and SIMD optimization, it delivers:

  • 🧠 AI-Native Design: Optimized for graph reasoning and AI workloads
  • Data-Oriented Design: SoA layout for maximum cache efficiency
  • 🚀 SIMD Optimization: Vectorized operations for peak performance
  • 🧩 Component System: Flexible entity-component architecture
  • 🛡️ Crash Safe: WAL-based durability with point-in-time recovery
  • 🔧 Zero Dependencies: Self-contained with minimal external requirements

✨ Key Features

🎨 Core Capabilities

  • Data-Oriented Design: Struct of Arrays (SoA) layout for maximum performance
  • Component System: Entity-component architecture for flexible data modeling
  • SIMD Operations: Vectorized processing for peak throughput
  • Static Memory Pools: Predictable performance with configurable memory limits
  • Write-Ahead Logging: Crash-safe persistence with point-in-time recovery
  • Graph Algorithms: BFS, Dijkstra, PageRank, and Community Detection
  • HTTP API: RESTful interface using nen-net networking framework
  • CLI Interface: Command-line tool for database management

🚀 Performance Features

  • Cache Locality: SoA layout optimizes memory access patterns
  • SIMD Optimization: Vectorized operations on aligned data structures
  • Hot/Cold Separation: Frequently accessed data separated from cold data
  • Memory Pools: Static allocation for zero GC overhead
  • Predictable Latency: Consistent response times under load
  • Efficient Storage: DOD-optimized data structures for graph operations
  • Cross-Platform: Linux, macOS, and Windows support

🔌 API Endpoints

  • GET /health - Server health check
  • GET /graph/stats - Graph statistics
  • POST /graph/algorithms/bfs - Breadth-first search
  • POST /graph/algorithms/dijkstra - Shortest path
  • POST /graph/algorithms/pagerank - PageRank centrality
  • POST /graph/algorithms/community - Community detection

🚀 Quick Start

🎯 DOD Demo

Experience the power of Data-Oriented Design:

# Run the DOD performance demo
zig build dod-demo

This demo showcases:

  • SoA Performance: Struct of Arrays vs Array of Structs
  • SIMD Filtering: Vectorized node and edge filtering
  • Component System: Entity-component architecture
  • Memory Statistics: Cache efficiency and utilization

📦 Installation

Linux (x86_64)

curl -fsSL https://github.com/Nen-Co/nen-db/releases/latest/download/nen-linux-x86_64.tar.gz | tar -xz

macOS (Intel)

curl -fsSL https://github.com/Nen-Co/nen-db/releases/latest/download/nen-macos-x86_64.tar.gz | tar -xz

macOS (Apple Silicon - M1/M2)

curl -fsSL https://github.com/Nen-Co/nen-db/releases/latest/download/nen-macos-aarch64.tar.gz | tar -xz

Windows PowerShell

Invoke-WebRequest -Uri "https://github.com/Nen-Co/nen-db/releases/latest/download/nen-windows-x86_64.zip" -OutFile "nen-windows.zip"
Expand-Archive -Path "nen-windows.zip" -DestinationPath "."

🐳 Docker (Recommended)

# Pull and run with HTTP server on port 8080
docker run --rm -p 8080:8080 --name nendb \
  -v $(pwd)/data:/data \
  ghcr.io/nen-co/nendb:latest

📦 Generated Binaries After building with specific targets, you'll find:

  • zig-out/bin/nendb - Executable for the current platform
  • zig-out/bin/nendb-server - HTTP server for the current platform

For cross-compilation, use:

  • zig build -Dtarget=x86_64-linux-gnu → Linux x86_64 binary
  • zig build -Dtarget=x86_64-macos-none → macOS Intel binary (no libc)
  • zig build -Dtarget=aarch64-macos-none → macOS Apple Silicon binary (no libc)
  • zig build -Dtarget=x86_64-windows-gnu → Windows x86_64 binary

💡 Note: The installation URLs in the Quick Start section will be updated when releases are published with the correct binary names for each platform.

🏃 Running NenDB

Start HTTP Server

./zig-out/bin/nendb-server
# Server will be available at http://localhost:8080

CLI Commands

# Check version
./zig-out/bin/nendb --version

# Start TCP server
./zig-out/bin/nendb serve

🧪 Test the Server

# Health check
curl http://localhost:8080/health

# Graph statistics
curl http://localhost:8080/graph/stats

� WebAssembly (WASM) Build

NenDB compiles to a lightweight 37KB WASM module for embedded usage in browsers and JavaScript environments:

📦 Quick Start

<script type="module">
    import NenDB from 'https://github.com/Nen-Co/nen-db/releases/latest/download/nendb-wasm.js';
    
    const db = await NenDB.loadFromURL('https://github.com/Nen-Co/nen-db/releases/latest/download/nendb-wasm.wasm');
    
    // Add graph data
    const node1 = db.addNode(100);
    const node2 = db.addNode(200);
    const edge = db.addEdge(100, 200, 1.5);
    
    console.log('Memory usage:', db.getMemoryUsage(), 'bytes');
    db.destroy();
</script>

🏗️ Build WASM

# Build WASM module
zig build wasm

# Output: zig-out/bin/nendb-wasm.wasm (~37KB)

Features

  • 🪶 Lightweight: Only ~37KB WASM file
  • ⚡ Embedded: SQLite-like simplicity for graph data
  • 🔧 Zero Dependencies: Pure Zig compiled to clean WASM
  • 🌐 Universal: Browser, Node.js, Deno, Bun support
  • 🛡️ Static Memory: Predictable performance in constrained environments

For detailed usage examples, see wasm/README.md.

�🏗️ Building from Source

📋 Prerequisites

🔨 Build Steps

# Clone the repository
git clone https://github.com/Nen-Co/nen-db.git
cd nen-db

# Build the project
zig build

# Run tests
zig build test

# Build optimized release
zig build -Doptimize=ReleaseSafe

# Build WASM module (~37KB)
zig build wasm

# Build for all target platforms (Linux, macOS Intel/ARM, Windows)
zig build cross-compile

# Or build for specific targets:
zig build -Dtarget=x86_64-linux-gnu    # Linux x86_64
zig build -Dtarget=x86_64-macos-none   # macOS Intel (no libc)
zig build -Dtarget=aarch64-macos-none  # macOS Apple Silicon (no libc)
zig build -Dtarget=x86_64-windows-gnu  # Windows x86_64

🐳 Docker Support

NenDB provides official Docker images via GitHub Container Registry (GHCR):

  • Latest: ghcr.io/nen-co/nendb:latest
  • Versioned: ghcr.io/nen-co/nendb:v0.1.0-beta
  • Simple variant: ghcr.io/nen-co/nendb:simple-latest

See DOCKER.md for comprehensive Docker usage instructions.

📚 Documentation

🧪 Testing

# Run all tests
zig build test

# Run specific test categories
zig build test-unit
zig build test-integration
zig build test-performance

# Run with coverage
zig build test --summary all

🚀 Performance

NenDB is designed for high-performance graph operations:

  • Static Memory: No dynamic allocations during runtime
  • Predictable Latency: Consistent response times under load
  • Efficient Algorithms: Optimized implementations of graph algorithms
  • Zero GC Overhead: Static memory pools eliminate garbage collection

🔮 Roadmap

🎯 v0.1.0-beta (Current)

  • ✅ Static memory graph database
  • ✅ HTTP API server
  • ✅ Basic graph algorithms
  • ✅ WAL persistence
  • ✅ CLI interface

🚀 Future Releases

  • 🔄 Enhanced graph algorithms
  • 🔍 Cypher-like query language
  • 🧠 Vector similarity search
  • 📊 GraphRAG support
  • ⚡ Performance optimizations
  • 🌐 Distributed clustering

🤝 Contributing

We welcome contributions! 🎉

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. 💾 Commit your changes (git commit -m 'Add amazing feature')
  4. 📤 Push to the branch (git push origin feature/amazing-feature)
  5. 🔄 Open a Pull Request

See our Contributing Guide for detailed information.

📄 License

This project is licensed under the APACHE 2.0 License - see the LICENSE file for details.

🆘 Support

🙏 Acknowledgments

  • Built with Zig for maximum performance
  • Networking powered by nen-net
  • I/O operations using nen-io
  • JSON handling via nen-json

Ready to build AI-native graph applications? 🚀 Get started now!