←News detail

Simon WillisonUpdated Oct 25 23:46

sparqlite: Implementing SPARQL 1.1 inside SQLite in Rust

AI summary

Simon Willison used Claude Code's Ultracode mode to generate sparqlite, a Rust-written loadable SQLite extension that stores RDF quads in ordinary SQLite tables and executes SPARQL 1.1 queries and updates inside the SQLite process. By integer-encoding terms, using covering indexes, a cost-based planner, batched joins, and optional direct reads of SQLite B-trees, it is 3.5 times faster than SQL translation in count mode and 2.8 times faster when returning full results, and it passes 636 of the 639 applicable W3C evaluation tests. The author says the experiment kept Claude Code running continuously for more than 12 hours; he cannot review the resulting code and is unsure how to use this implementation built on a whim.

Why read this

AI score 55

The author let Claude Code run for 12 hours on a prompt accidentally typed on a phone, producing a working SPARQL extension—and code that is hard to review.

Topics

Tags

Body

#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.

Source

Simon Willison