Skip to content

feat(pkg): add compat.sqlite3@3.45.3 — SQLite C amalgamation (most widely deployed 3.45.x line) - #190

Merged
Sunrisepeak merged 1 commit into
mcpplibs:mainfrom
wellwei:codex/sqlite3
Aug 8, 2026
Merged

feat(pkg): add compat.sqlite3@3.45.3 — SQLite C amalgamation (most widely deployed 3.45.x line)#190
Sunrisepeak merged 1 commit into
mcpplibs:mainfrom
wellwei:codex/sqlite3

Conversation

@wellwei

@wellwei wellwei commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

概述

新增 compat.sqlite3 —— SQLite 数据库引擎本体,C 源码 compat(形态 A),用户 #include <sqlite3.h> 开箱即用。

版本:3.45.3(部署最广,非最新)

按需求选择广泛使用版本:3.45.x 是当前部署面最广的版本线

  • Ubuntu 24.04 LTS 携带 3.45.1;CPython 3.11/3.12/3.13 官方安装器携带 3.45.1/3.45.3/3.45.3
  • 3.45.3 = 3.45.x 线最后一个维护版(含该线安全/稳定性修复),API 与 Ubuntu LTS 一致、更成熟
  • 未选最新 3.53.4:新版本线部署面未铺开

形态

  • A(C 源码 compat):仅编 sqlite3.c 进 lib;shell.c(CLI,依赖 editline/readline)不编
  • include_dirs = {"*"} 暴露 sqlite3.h / sqlite3ext.h;amalgamation 开箱即编,无需 define
  • 无 feature:可选功能均由编译期 define 控制(如 SQLITE_ENABLE_*),当前 feature 表只能门控 sources、不能携带 define(同 compat.eigen 结论)

镜像

  • GLOBAL = https://sqlite.org/2024/sqlite-amalgamation-3450300.zip(sha256 两次计算一致:ea170e73…)
  • 无 CN 镜像:sqlite.org 是 amalgamation 唯一权威来源(GitHub sqlite/sqlite 镜像仓不含生成的 sqlite3.c);无 mcpp-res 写权限 → 纯字符串 url 回退(先例:compat.hiredis / compat.spdlog)

验证(本地,CI 同版 mcpp 2026.8.8.2)

  • 消费者成员 tests/examples/sqlite3 断言 sqlite3_libversion()=="3.45.3",并走 open(:memory:) → exec 建表/插入 → 预编译语句查询 全链路
  • mcpp test -p sqlite3: test result ok. 1 passed; 0 failed(冷状态,自动装 llvm@20.1.7)
  • lint 全绿:lua 语法 / 必填字段 / 无前导 v / check_mirror_urls / check_package_name / 全仓 check_cross_package_refs

文档

  • README / README.zh-CN 引用示例表新增 compat.sqlite3
  • 设计文档 .agents/docs/2026-08-09-add-sqlite3-plan.md:形态判定、版本依据、多版本支持方案(单 mcpp 块 + xpm 行即可)

CI 预期

  • lint + workspace(linux/macos/windows) 应仅选中 sqlite3 成员并通过
  • 后续可选:CN 镜像(需 mcpp-res 权限)、新版本线(C++ 封装如 sqlite_orm 建议独立 PR)

…dely deployed 3.45.x line)

- Shape A (C-source compat): compile the single sqlite3.c amalgamation into a
  lib, expose sqlite3.h/sqlite3ext.h via include_dirs; shell.c (interactive
  CLI, needs editline/readline) stays out.
- Version 3.45.3 = final maintenance release of the most widely deployed
  SQLite series (Ubuntu 24.04 LTS ships 3.45.1; CPython 3.11/3.12/3.13
  installers ship 3.45.1/3.45.3/3.45.3), chosen over newer series per user
  request (widely-used, not latest).
- GLOBAL = sqlite.org amalgamation zip (sha256 verified twice); no CN mirror
  (plain-string url fallback — the GitHub sqlite/sqlite mirror does not carry
  the generated sqlite3.c).
- Consumer member tests/examples/sqlite3 asserts sqlite3_libversion()==3.45.3
  and exercises open/create/insert/prepared-query end to end; verified cold
  with the CI-pinned mcpp 2026.8.8.2 (test result ok, 1 passed).
- Design doc covers shape decision, version rationale, multi-version support
  plan (one mcpp block, xpm rows only).
@Sunrisepeak
Sunrisepeak merged commit b86fc7c into mcpplibs:main Aug 8, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants