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

hexcore-better-sqlite3

v2.0.0

Published

HexCore N-API wrapper for SQLite (better-sqlite3 fork)

Downloads

115

Readme

HexCore Better-SQLite3

N-API wrapper for SQLite, based on the better-sqlite3 binding layer. Part of HikariSystem HexCore.

Architecture

This package follows the standard HexCore native wrapper pattern:

  • src/better_sqlite3.cpp — N-API binding (the wrapper layer)
  • deps/sqlite3/include/ — SQLite headers
  • deps/sqlite3/sqlite3.lib — Pre-compiled static library (Windows)
  • deps/sqlite3/libsqlite3.a — Pre-compiled static library (Linux/macOS)
  • lib/ — JavaScript API layer (Database, Statement, Transaction, etc.)

The SQLite engine is pre-compiled as a static library and linked at build time. This avoids recompiling ~245k lines of C on every npm install.

Installation

npm install

The install script uses prebuild-install to download pre-built binaries. Falls back to node-gyp rebuild only if no prebuild is available.

Building from Source

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • Visual Studio Build Tools 2022 with C++ workload (Windows)
  • GCC/Clang with C++17 support (Linux/macOS)

One-time: Build the SQLite static library

If deps/sqlite3/sqlite3.lib (or .a) doesn't exist yet:

node scripts/build-sqlite3-lib.js

This compiles deps/sqlite3/sqlite3.c into a static library once. After that, commit the .lib/.a and you never need to recompile SQLite again.

Build the N-API wrapper

npm run build

Generate prebuilds

npm run prebuild

Usage

const { openDatabase } = require('hexcore-better-sqlite3');

const db = openDatabase(':memory:');
db.exec('CREATE TABLE kv (id INTEGER PRIMARY KEY, value TEXT)');
db.prepare('INSERT INTO kv(value) VALUES (?)').run('hello');
const row = db.prepare('SELECT value FROM kv WHERE id = 1').get();
console.log(row.value); // 'hello'
db.close();

Testing

npm test

License

MIT