Skip to content

The q* stdlibqpkgs

13 zero-dependency crates, one substrate.

The shared foundation under every Qirava product. Two crates form the substrate — qexec, the bounded executor, and qvalue, the value model and ABI — and eleven focused utilities sit on top. Crypto, encoding, regex, and arbitrary-precision numbers are all written from scratch. Products depend on q*; q* never depends on a product.

zero-dep crates13
substrate crates2
way the arrow points1
third-party deps0

What it is

One substrate, written from scratch

The q* stdlib is everything the products need that would otherwise come from crates.io — built first-party instead. Thirteen small crates: a bounded executor, a shared value model, and eleven utilities that own their own crypto, encoding, regex, and big-number math.

qexec

The bounded executor

Every call runs inside qexec, the runtime that governs memory and work with explicit resource budgets. Nothing executes unbounded.

qvalue

The value model + ABI

One unified Value and Record codec is the language every function speaks. It is the contract shared across the whole ecosystem.

eleven utilities

Batteries, no dependencies

array, object, string, math, number, convert, crypto, encoding, regex, time, and uuid — each replacing a third-party package with first-party code.

What's inside

Real capabilities, all first-party

These are the building blocks the products actually call. Each one is std plus first-party code only — the supply chain is exactly the team that ships it.

qexec

Bounded execution + budgets

Resource budgets bound memory and work per call, so a runaway function is stopped by the runtime rather than the host.

qvalue

Unified Value / Record codec

One representation encodes and decodes every value and record — the single shape that crosses every function boundary.

qcrypto

From-scratch cryptography

SHA-256, HMAC, and SHA-1 implemented in-house behind a Crypto trait — the one dependency seam, kept first-party to avoid lock-in.

qencoding

Base64 + hex

Encoders and decoders for base64 and hex, written from scratch — no pulled-in encoding crate.

qregex

A regex VM

A real regular-expression engine — a compiled pattern run on a small virtual machine, not a wrapper around an external crate.

qnumber + quuid

Big numbers + UUIDs

Arbitrary-precision number math, plus UUID v4 and v7 generation and parsing — both implemented directly on the value model.

How it works

The Record convention, one register() per package

The whole stdlib follows one calling convention and one wiring pattern. Once you have seen a single function, you have seen them all.

the Record convention

Positional args in, {result} out

Every function takes its arguments positionally as a Record and returns its answer as a Record with a {result} field. Same shape in, same shape out — across all thirteen crates.

register()

One register() per package

Each utility crate exposes a single register() that adds its functions to the executor's registry. Wiring the stdlib in is a handful of register() calls — nothing hidden.

no cycles

qexec does not depend on qvalue

The executor stays independent of the value model, so the substrate has no circular dependency. The arrow only ever points up: products → utilities → substrate.

Architecture

Layered, never circular

The substrate sits at the bottom — qexec and qvalue, each independent. Eleven utilities layer on top of the value model, and the products sit above everything. The dependency arrow only points one way, so the graph is acyclic by rule.

Status

What's built today

All 13 crates are shipping and in use across the products. The substrate and every utility are first-party and zero-dependency; a few areas are still maturing.

  • qexec — the bounded executorResource budgets governing memory and work for every call; the runtime the products serve on.
    Built
  • qvalue — the value model + ABIOne unified Value/Record codec; the shared contract every function speaks.
    Built
  • From-scratch crypto + encodingSHA-256, HMAC, SHA-1 behind a Crypto trait, plus base64 and hex — all first-party.
    Built
  • regex VM, big numbers, UUID v4/v7A compiled regex engine, arbitrary-precision number math, and UUID generation/parsing.
    Built
  • One-way dependency directionProducts depend on q*; q* never depends on a product — enforced as a structural rule.
    Built
  • Broader utility coverageThe eleven utilities cover what the products need today; surface area grows as the products do.
    Partial

Stand on the substrate

Read the concepts behind the value model and the bounded executor, or see how the products are composed from these crates.