Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:2giosangmitom Sqmeow nvim Nix Development Shell

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Development_Environment
Last Updated 2026-10-16 14:00 GMT

Overview

Nix flake development shell providing Rust 1.98+, Neovim, formatters, and system SQLite/DuckDB shared libraries for building and testing sqmeow.nvim.

Description

This environment provides the toolchain needed to build the Rust engine and run the Lua test suite. It is activated by entering nix develop in the repository root. The Nix flake supplies the Rust compiler (matching rust-version = "1.98"), the Neovim binary with Lua runtime, formatters (StyLua, Selene, lua-language-server), and the system-level SQLite and DuckDB shared libraries and headers that development builds link against dynamically.

Distribution builds differ: they use just dist-build <target> with the bundled feature, which compiles SQLite and DuckDB from source for static release archives.

Usage

Use this environment for any development work: building the engine (just build / just build-debug), running linters (just lint), running tests (just test), and regenerating documentation (just docs). It is the mandatory prerequisite for all just recipes and direct Cargo commands.

System Requirements

Category Requirement Notes
OS Linux or macOS Nix works on both; Windows requires WSL2
Software Nix with flakes and nix-command Install from nixos.org
Disk ~5GB for Nix store Initial setup downloads and builds dependencies
Memory 2GB+ recommended Use SQMEOW_CARGO_FLAGS='-j 1' on limited-memory machines

Dependencies

System Packages (via Nix)

  • rustc >= 1.98 (edition 2024)
  • cargo
  • neovim (with Lua runtime for test suite)
  • sqlite (shared library + headers, dynamically linked)
  • duckdb (shared library + headers, dynamically linked)
  • stylua (Lua formatter)
  • selene (Lua linter)
  • lua-language-server (Lua type checker)

Rust Workspace Dependencies

  • tokio >= 1.53 (multi-thread runtime)
  • rusqlite >= 0.40
  • duckdb >= 1.10506
  • tokio-postgres >= 0.7
  • mysql_async >= 0.37
  • mongodb >= 3.9
  • redis >= 1.7
  • scylla >= 1.9
  • surrealdb >= 3.3
  • clickhouse >= 0.15
  • oracledb >= 26.0.0-beta.4
  • tiberius >= 0.13 (MSSQL)

Lua Dependencies

  • Neovim with Lua runtime
  • SQL Tree-sitter parser (installed by Lua test harness)

Credentials

No credentials required for the development environment itself. Test database credentials are managed through SQMEOW_TEST_*_URL environment variables (see Environment:2giosangmitom_Sqmeow_nvim_Docker_Compose_Test_Databases).

Quick Install

# Install Nix (if not already installed)
sh <(curl -L https://nixos.org/nix/install) --daemon --no-modify-profile

# Enable flakes and nix-command (add to ~/.config/nix/nix.conf)
experimental-features = nix-command flakes

# Enter the development shell
cd sqmeow.nvim
nix develop

# Build the engine (use -j 1 on limited-memory machines)
SQMEOW_CARGO_FLAGS='-j 1' cargo build

Code Evidence

Rust edition and version requirement from Cargo.toml:7-8:

[workspace.package]
edition = "2024"
rust-version = "1.98"

Bundled feature for distribution builds from core/sqmeow-core/Cargo.toml:35-38:

# Forwarded to sqmeow-adapters: compile bundled SQLite/DuckDB sources for
# static release archives. Regular builds stay on system shared libraries.
[features]
bundled = ["sqmeow-adapters/bundled"]

Dynamic linking note from core/sqmeow-adapters/Cargo.toml:43-47:

# Release archives link SQLite/DuckDB from compiled sources instead of the
# dev shell's shared libraries. Dev/test/lint builds omit this feature and
# stay dynamic.
[features]
bundled = ["duckdb/bundled", "rusqlite/bundled"]

Memory-conscious build flag from AGENTS.md:15:

- Build: `just build` (release) or `just build-debug`. For limited memory, use `SQMEOW_CARGO_FLAGS='-j 1' just <recipe>`.

Common Errors

Error Message Cause Solution
error: command not found: nix Nix not installed Install Nix from nixos.org and enable flakes
error: experimental Nix feature 'flakes' is disabled Flakes not enabled Add experimental-features = nix-command flakes to nix.conf
SQLite/DuckDB link errors Missing shared libraries Ensure you are in nix develop; dev builds link system libs
ETXTBSY when running tests Binary still being written by another process Justfile handles this; run just test-lua which rebuilds first
OOM during build Limited memory with parallel compilation Use SQMEOW_CARGO_FLAGS='-j 1' just build

Compatibility Notes

  • Linux: Primary development platform. All features supported.
  • macOS: Supported through Nix. Some native dependencies may differ.
  • Windows: Not directly supported; use WSL2 with Nix installed inside.
  • Bundled builds: Distribution builds (just dist-build) compile SQLite/DuckDB from source, eliminating the shared-library dependency at the cost of longer build times.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment