Skip to content

Releases

typedb-lean v0.2.0

Choose a tag to compare

@github-actions github-actions released this 02 Dec 11:46

Lean v4.37.0-rc1. Projects that depend on typedb-lean must use the same Lean toolchain; stay on v0.1.0 for Lean v4.35.0.

Changed

  • Lean toolchain v4.37.0-rc1 (was v4.35.0); doc-gen4 v4.37.0-rc1 for the API docs. No source changes were needed.

typedb-lean v0.1.0

Choose a tag to compare

@Volland Volland released this 29 Oct 12:09

First release: a TypeDB 3 client for Lean 4 over the official C driver (typedb-driver 3.14.0), for Lean v4.35.0.

Added

  • Native layer: the C driver built from the pinned typedb-driver tag by Lake and cargo, or a prebuilt library through TYPEDB_DRIVER_LIB; a C shim that decodes many rows per native call.
  • Connections with credentials and optional TLS; database create, delete, list and schema.
  • Tx .read/.write/.schema: transaction bodies whose mode is checked at compile time; Driver.runSync commits on success and rolls back on error; typed TypeDBError; opt-in retry of commit conflicts.
  • Driver.run: transactions as Std.Async.EAsync computations on dedicated threads.
  • typeql!: TypeQL with escaped, typed interpolation and an inferred transaction mode; Raw for verbatim text.
  • Row decoders, deriving FromRow, exact value types (Decimal, Duration, DatetimeTZ, Std.Time dates), strict, folded and streamed results, and fetch through Lean.FromJson.
  • A lightweight ORM: deriving Entity, Relation and Polymorphic; references by key or IID; subtypes through extends; relations playing roles; multi-valued attributes; schema generation and verification.
  • Versioned up/down migrations with history and checksum drift detection stored in the database.
  • Benchmarks against the official Rust driver (lake exe bench), the social example, a guide and API docs.

Requirements

  • Building needs a Rust toolchain and protoc (the driver's protocol crate compiles protobuf definitions).

Known limitations

  • typedb-driver 3.14.0 retains about 600 bytes per opened transaction (upstream, also in its Rust API).
  • Windows is not supported. On GitHub's macOS runners only the unit tests run, because they cannot run Linux containers.

Benchmarks against the official Rust driver (same server, typedb-driver 3.14.0)

Workload typedb-lean Rust driver
Scan of 100k rows into structures 155k rows/s 142k rows/s
Point lookup, p50 / p99 1.05 / 1.52 ms 1.03 / 2.39 ms
Bulk insert of 10k entities 4.75 s 4.71 s
16 concurrent reads 367 ms 607 ms

Install

require «typedb-lean» from git "https://github.com/Volland/typedb-lean" @ "v0.1.0"

Building needs a Rust toolchain and protoc. See the guide and the API reference.