←新闻详情

Simon Willison更新于 10月25日 23:46

sparqlite:用 Rust 在 SQLite 内实现 SPARQL 1.1

Research: sparqlite: SPARQL 1.1 inside SQLite, written in Rust

AI 导读

Simon Willison 用 Claude Code 的 Ultracode 模式生成 sparqlite,这是一个 Rust 编写的 SQLite 可加载扩展,把 RDF 四元组存入普通 SQLite 表,并在 SQLite 进程内执行 SPARQL 1.1 查询与更新。它通过整数编码词项、覆盖索引、基于代价的规划器、批量连接和可选的 SQLite B-tree 直读,在 count 模式下比 SQL 翻译快 3.5 倍,返回完整结果时快 2.8 倍,并通过 639 项适用 W3C 评测测试中的 636 项。作者称这次实验让 Claude Code 连续运行超过 12 小时,他无法审阅产出的代码,也不确定该如何使用这个凭一时兴起做出的实现。

推荐理由

AI 评分 55

作者用一次手机误打的提示词让 Claude Code 跑了 12 小时,产出可运行的 SPARQL 扩展,也留下难以审阅的代码。

主题

标签

正文

#smallhead

16th October 2026

Research sparqlite: SPARQL 1.1 inside SQLite, written in Rust — sparqlite is a Rust-based SQLite loadable extension that stores RDF quads in ordinary SQLite tables and executes SPARQL 1.1 queries and updates natively inside the SQLite process. Its integer-encoded terms, covering indexes, cost-based planner, batched joins, and optional direct SQLite B-tree reader deliver 3.5× speedups over SQL translation in count mode and 2.8× when returning full results, while passing 636 of 639 applicable W3C evaluation tests and millions of differential-fuzz…

This research task is really an experiment in running Claude Code for web in "Ultracode" mode, as described in Orchestrate subagents at scale with dynamic workflows in the Claude Code documentation.

With Ultracode turned on, Claude Code makes aggressive use of dynamic workflows - it generates JavaScript that defines and coordinates a network of subagents to take on complex problems.

My initial prompt was this - I meant "hit the rows directly", the word "delete" was an accidental typo on my phone:

Write a SQLite extension in Rust that implants SPARQL and runs really fast because it can hit the delete rows directly

This caused Claude Code for web to churn for over 12 hours. I checked in on its progress the next day and sent a single follow-up prompt when I noticed how many Rust crates it had built:

Every folder in the crates/ directory needs a README

Include a tutorial.md teaching users how to install the extension and how to run it in the SQLite CLI and then teaching them SPARQL in addition to how to use the SQLite extension

Include a script with the tutorial for populating a SQLite database with useful and realistic example data for that tutorial

This project feels like next-level vibe coding - it's not remotely feasible to review the code that was produced here, and even following the documentation is a significant investment in work. I'm not entirely sure what to do with this - I appear to have a full SPARQL implementation in Rust inside SQLite now, but how valuable is that if I created it on a whim and can't (or won't) invest the necessary time to understand what it can do?

Posted 16th October 2026 at 1:58 am

Recent articles

Battle Drones - a vibe coded RTS with audio-based multiplayer - 20th October 2026

Hello Python 3.15, goodbye 3.10, and now I can use 3.11 - 12th October 2026

A new feature for my blog, built using my voice - 9th October 2026

Claude Haiku 5.5 - 7th October 2026

This is a beat by Simon Willison, posted on 16th October 2026.

来源

Simon Willison