Skip to content
IDL · CBOR · Multi-target Codegen · Schema Stability

Define Once,
Generate Everywhere

IonPath is a contract language and binary protocol for distributed applications. Write .ion schemas, generate type-safe C# and TypeScript code, and enforce wire-format stability with schema locks.

example.ion
msg User {
  id: u4;
  name: string;
  email: string?;
  roles: u4[];
}

service UserService(spaceId: u4) {
  GetUser(userId: u4): User;
  CreateUser(name: string, email: string?): User;
  stream WatchUpdates(): User;
}
27+
Primitive Types
CBOR
Binary Protocol
3
Target Languages
30+
Diagnostic Codes

Everything you need for typed contracts

From schema definitions to production-ready, type-safe code in C# and TypeScript.

Rich IDL Syntax

Messages, services, unions, enums, flags, generics, typedefs, and custom attributes. Everything to describe your domain precisely.

Syntax Overview →

CBOR Encoding

Compact binary serialization using CBOR. Index-based field encoding for maximum wire efficiency — like protobuf, but with richer type support.

Wire Protocol →

Multi-target Codegen

Generate type-safe code for C# (.NET) and TypeScript (browser) from a single .ion source.

Code Generation →

Schema Locks

Pin field indices, method signatures, and enum values in ion.lock.json. Breaking changes are detected at compile time.

Schema Lock →

Streaming RPC

Unary request-response and full-duplex streaming over WebSocket. Ticket-based authentication built in.

Services →

Comprehensive Diagnostics

30+ error codes with cycle detection, typo suggestions via Levenshtein distance, and schema migration warnings.

Diagnostics →

JavaScript SDK

Browser-ready TypeScript SDK with binary reader/writer, CBOR codec, and formatter system. Works with generated service clients.

JS SDK →

.NET Runtime

Server and client libraries for ASP.NET Core. DI integration, interceptors, OpenTelemetry instrumentation, and deadline handling.

.NET Runtime →

VS Code Extension

Syntax highlighting for .ion files, JSON schema validation for ion.config.json, and TextMate grammar.

Getting Started →

Three steps to your first contract

1

Install the CLI

Install ionc as a .NET global tool:

dotnet tool install -g ionc
2

Write your schema

Create a .ion file with your types and services:

msg User {
  id: u4;
  name: string;
  email: string?;
  roles: u4[];
}

service UserService(spaceId: u4) {
  GetUser(userId: u4): User;
  CreateUser(name: string, email: string?): User;
  stream WatchUpdates(): User;
}
3

Compile

Run the compiler to generate code and lock the schema:

$ ionc init
→ Created ion.config.json

$ ionc compile
→ Compiled 3 modules (C#, TypeScript)
→ ion.lock.json updated

Documentation

Comprehensive guides for every aspect of IonPath.