Skip to content

typesafe-rs

Latency-focused community Rust SDK for System One with official-SDK parity, an optional blocking client and an in-process mock crate.

LibrarybetaMIT

Overview

typesafe-rs is an MIT-licensed community Rust client for TypeSafe's System One API. Environment variables, defaults, retries, identification headers and error kinds match the official Python SDK and @typesafe-ai/sdk. It is async by default on tokio, with an optional blocking feature, and uses rustls TLS by default with native-tls available. MSRV is Rust 1.85.

Questions are built with a questions! macro and fluent builders (when_true and when_false for Noul criteria, option for Choice, level for Score), and responses offer typed accessors. A companion crate, typesafe-rs-mock, provides an in-process mock of /v1/systemone and /v1/models for tests. The lists describe it as latency-first. It is published on crates.io with CI. The README states that environment variables, defaults, retries, identification headers and error kinds were matched to the official SDKs on purpose.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this convey urgency?Explicitly time-sensitive · No time pressure
ChoiceWhich team should handle this?billing · technical · sales
ScoreHow frustrated is the customer?Calm · Frustrated · Very angry

How it works

  1. Add typesafe-rs (and tokio) to Cargo.toml.
  2. Create a Client from the environment.
  3. Call system_one with state and the questions! macro.
  4. Read noul, choice or score from the response.

Strengths

  • Behavior parity with official SDKs.
  • In-process mock crate for tests.
  • Async or blocking clients.

Caveats

  • Community SDK; version 0.1.
  • Requires a TypeSafe key.

Getting started

Add typesafe-rs = "0.1" to Cargo.toml and export TYPESAFE_API_KEY.

At a glance

Type
Library
Status
beta
Language
Rust
Runtime
library (crate)
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

How do I test without the API?

Use the typesafe-rs-mock crate, which mocks the endpoints in-process.

Is there a blocking client?

Yes, behind the blocking feature.

What is the minimum Rust version?

1.85.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython