LEPTRIS

About

Why leptris?

lep · hare — tris · three. A thousand-year-old image of three hares sharing three ears, and the two promises this library makes: speed, and containment.

the full leptris mark — rotate it 120°, it is the same

The motif

On the ceilings of the Buddhist cave temples at Dunhuang, at the edge of the Gobi where the Silk Road funnels into China, painters of the Sui and Tang dynasties left a small puzzle: three hares chasing each other in a circle, and between them only three ears. Each hare looks fully equipped — two apiece — yet count them and there are three, not six. The design turns on perfect three-fold rotation: every ear belongs to two hares at once, and nothing in the pattern is redundant.

The image traveled. It appears in Buddhist caves and on ceramics in China, in the metalwork and manuscripts of central Asia and Persia, and — centuries later — carved into the roof bosses and painted on the chancel arches of parish churches across England and northern Europe, where it is still called the three hares. One image, carried along the whole length of the Silk Road, understood everywhere it landed. A design meant for wide acceptance.


The name

leptris says exactly what it is:

morphemerootmeaning
leplepus (Latin)hare
tristreis (Greek)three

Hares are fast — famously, alarmingly fast. Three of them run in a circle, and the circle is closed. That is the whole design brief of this library, stated in seven letters.


What the hares promise

Speed. Hares in full chase. The parse path is a vectorized scan over the document; the tree is carved from one contiguous arena with indices where other libraries walk pointers; repeated XPath queries are served from a subtree-interval index at effectively no cost. On text-heavy documents leptris parses3.4× faster than pugixml; through Ruby it does a 4.38 MB parse-and-serialize in 18 ms where Nokogiri takes 123 ms.

Containment. The circle closes. One arena per parse, sized from the document before the first node exists; elements at 64 bytes, attributes at 40; mutation storage in chained blocks owned by the document; everything released in a single call. A hard bound on memory you can state before you parse — a self-sufficient core withzero required dependencies, nothing hidden behind the ring.

And like the motif itself, the library is built to travel: pure C99, the same bounded core behind bindings for Ruby, Python, and the shell.


The mark

The leptris mark comes in two forms, and each has one job:

iconThe everyday mark — the three hares in their ring. Mastheads, favicons, footers. This is the one you see everywhere.
fullThe complete artwork — shown only where the motif itself is the subject. It carries the whole design at once, so it is reserved for the story.

Both forms ship in a light and a dark palette, tuned to their background. This site follows your color scheme — and the mark follows the site.


The project

libleptris is the C99 core: XML 1.0 parsing with namespaces, a W3C-conformant XPath 1.0 engine, streaming SAX, XInclude, DTD validation, and canonical XML. The leptris Ruby gem, the leptris package for Python, and the leptrisRust crate wrap the same public ABI — thin mirrors over the same bounded core, verified by a drift gate in CI. The project was previously called taurus.

← Back to the front page ·Read the docs ·github.com/leptris/leptris