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

arkilian

v1.0.6

Published

Arkilian - SQLite wrapper with automated cloud backup for Node.js/Bun

Readme

PRs Welcome License: MIT Stargazers

Arkilian

Arkilian is a managed embedded databas that wraps SQLite and is written in C, designed to extend SQLite with automated cloud backup functionality and horizontal scaling (in the coming updates).

Key Features

  • Simplified SQLite Binding: Exposes fundamental SQLite session management alongside fully permissive raw handle extraction.
  • Background Data Protection: Features an integrated background thread that continuously executes unblocking online snapshots and securely replicates the database to AWS S3 using presigned URLs.
  • Cross-platform CMake Integration: Configured to compile seamlessly across macOS, Linux, and Windows.
  • Multi-language Support: Build as shared library for Node.js/Python FFI or static library for embedded C/C++ applications.
  • Environment-based Configuration: All settings configurable via ARKILIAN_ prefixed environment variables.

Getting Started

Prerequisites

  • A C99 compliant compiler (GCC, Clang, or MSVC)
  • CMake 3.10 or higher
  • libcurl (e.g., libcurl4-openssl-dev on Debian/Ubuntu, or native via Xcode SDK on macOS)
  • A POSIX environment or compatibility layer (for Windows)

Build Instructions

You can build the library using CMake. Both static and shared libraries are built by default.

# Clone the repository
git clone https://github.com/CodeDynasty-dev/birth-of-Arkilian.git
cd birth-of-Arkilian

# Generate build files
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release

# Compile the target
cmake --build build --config Release

# Install to system (optional)
sudo cmake --install build

Configuration

Arkilian uses environment variables with the ARKILIAN_ prefix for configuration:

| Variable | Default | Description | |----------|---------|-------------| | ARKILIAN_DB_PATH | app.sqlite | Path to the SQLite database file | | ARKILIAN_BACKUP_PATH | backup.sqlite | Path for backup files | | ARKILIAN_BACKUP_INTERVAL | 3600 | Backup interval in seconds (default: 1 hour) | | ARKILIAN_SIGNED_URL_ENDPOINT | (none) | API endpoint for getting S3 presigned URLs | | ARKILIAN_ENABLE_BACKUP | 1 | Set to 0 to disable automated backups |

Example .env file:

ARKILIAN_DB_PATH=myapp.db
ARKILIAN_BACKUP_PATH=/backups/myapp-backup.db
ARKILIAN_BACKUP_INTERVAL=7200
ARKILIAN_SIGNED_URL_ENDPOINT=https://myapi.com/get-signed-url
ARKILIAN_ENABLE_BACKUP=1

Build Options

| Option | Default | Description | |--------|---------|-------------| | ARKILIAN_BUILD_SHARED | ON | Build shared library for FFI (Node.js/Python) | | ARKILIAN_BUILD_STATIC | ON | Build static library for embedded use | | ARKILIAN_BUILD_EXAMPLES | ON | Build example programs | | ARKILIAN_BUILD_TESTS | OFF | Build test programs |

Usage Examples

C/C++ Static Linking

#include "class.h"
#include <stdio.h>
#include <sqlite3.h>

int main(void) {
    arkilian *db = NULL;
    
    // Initialize Arkilian database context
    if (db_init(&db, "app.sqlite") != 0) {
        fprintf(stderr, "Initialization failed: %s\n", 
                db ? db_errmsg(db) : "Memory allocation error");
        if (db) db_close(db);
        return 1;
    }

    // Extract the raw sqlite3 handle to execute arbitrary statements
    sqlite3 *raw_db = db_get_handle(db);
    int rc = sqlite3_exec(raw_db, "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT);", 0, 0, NULL);
    
    if (rc != SQLITE_OK) {
        fprintf(stderr, "SQL Execution failed: %s\n", db_errmsg(db));
    }

    // Release resources gracefully
    db_close(db);
    return 0;
}

Compile with static library:

gcc -I/usr/local/include/arkilian -L/usr/local/lib -larkilian myapp.c -o myapp

Node.js FFI (using node-ffi or similar)

The shared library (libarkilian.so/libarkilian.dylib/arkilian.dll) exports C functions that can be called from Node.js using FFI libraries like ffi-napi or koffi.

Python FFI (using ctypes)

import ctypes
import os

# Load the shared library
if os.name == 'nt':  # Windows
    arkilian = ctypes.CDLL('./libarkilian.dll')
else:  # Unix-like
    arkilian = ctypes.CDLL('./libarkilian.so')

# Define function signatures
arkilian.db_init.restype = ctypes.c_int
arkilian.db_init.argtypes = [ctypes.POINTER(ctypes.c_void_p), ctypes.c_char_p]

# Use the library
db = ctypes.c_void_p()
ret = arkilian.db_init(ctypes.byref(db), b"app.sqlite")

NPM Package

For Node.js projects, you can install via npm:

npm install arkilian

The package will attempt to download prebuilt binaries for your platform. If no prebuilt binary is available, it will fall back to building from source using cmake-js.

System Constraints and Design Choices

Unlike complex distributed SQLite systems (e.g., LiteFS or rqlite), Arkilian embraces single-writer architectures partitioned by micro-datasets. It purposefully avoids:

  • Virtual File System (VFS) complexities.
  • Multi-writer coordination overhead and distributed consensus mechanisms.

Running Tests

cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DARKILIAN_BUILD_TESTS=ON
cmake --build build --config Debug
./build/test_basic

Contributing

Please see CONTRIBUTING.md for details on submitting patches and the contribution workflow.

License

Arkilian is licensed under the MIT License. See the LICENSE file for details.