Vibeleaderboard
← All Intel
Intel / article

sparqlite: SPARQL 1.1 inside SQLite, written in Rust

Source
simonwillison.net
Date

Context

Simon Willison has published sparqlite, a Rust extension that lets SQLite answer SPARQL 1.1, the query language for RDF graph data, where facts are stored as linked statements. It keeps that data in ordinary SQLite tables and runs SPARQL queries and updates inside the SQLite itself. The design point, according to the project's README, is that it never turns a whole SPARQL query into one string for SQLite's own planner to work out. Instead it uses integer-encoded terms, covering indexes and its own cost-based planner, and can optionally read SQLite's B-tree storage directly.

The README reports a geometric-mean speedup of 3.5x when queries only count results and 2.8x when they return full results. The comparison is against a SPARQL-to-SQL translator the project includes as a baseline, run on 1.6 million social-network triples plus 1 million product and offer triples on a 4-vCPU cloud VM. It also says 636 of the 639 applicable W3C query and update evaluation tests pass, with the three failures traced to the shared spargebra parser, and that differential fuzzing made about 7.7 million comparisons. The README opens by saying it is an AI-generated research report, and it notes that only Linux was tested.

That provenance is what the post is really about. Willison built it with Anthropic's Claude Code for web in Ultracode mode, a setting in which Claude writes a JavaScript dynamic workflow script that coordinates many subagents rather than working turn by turn. A one-line prompt sent from his phone, typo included, kept it working for over 12 hours. His only follow-up asked for a README in every crate , a tutorial, and a script to load realistic example data. He calls the result next-level : reviewing the code is not remotely feasible, and even following the documentation takes real work. He ends by asking how valuable a full SPARQL implementation is when he made it on a whim and cannot or will not put in the time to understand what it does.

Key takeaways · AI-distilled
  • Simon Willison gave Claude Code for web in Ultracode mode, which generates JavaScript to coordinate networks of subagents, a one-line prompt containing a typo; it worked for over 12 hours and built a SPARQL 1.1 engine as a Rust SQLite extension.
  • The project's summary reports 3.5x speedups over SQL translation in count mode and 2.8x when returning full results, and 636 of 639 applicable W3C evaluation tests passing, from integer-encoded terms, covering indexes and a cost-based planner.
  • Willison writes that reviewing the generated code is not remotely feasible and even following its documentation takes significant work, and questions the value of a full implementation created on a whim without time invested to understand it.
Terms in this piece · Glossary
  • Process — A running instance of a program, with its own working memory, open files and identity.
  • Database and SQL — Persistent structured storage queried and changed through explicit operations.
  • Folder — A named container that holds files and other folders; also called a directory.
  • vibe coding — Building software by describing what you want to an AI in plain language and steering the result, instead of writing every line yourself.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source simonwillison.net
Tools in this story
Recommended reads