npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xidl-typescript-codec

v0.84.0

Published

Zod-based JSON serializer and deserializer with metadata support (rename, flatten, omitempty, ignore)

Readme

XIDL

demo

Define interfaces once. Generate APIs, SDKs, specs, and tooling from one source of truth.

XIDL is an IDL-first contract platform for teams that want one interface definition to drive HTTP, JSON-RPC, streaming APIs, security metadata, generated SDKs, and machine-readable specs. It combines contract authoring, protocol mapping, code generation, and interactive tooling into one workflow.

Discord Server Invite

Crates.io Version Crates.io Version GitHub Release VS Code Extension GitHub

What XIDL Makes Possible

XIDL capabilities

XIDL works well as the contract layer for API teams because interface intent is explicit, structured, and centralized. That makes the system easier for humans to review and easier for tools and AI systems to understand, generate from, lint, and keep in sync.

Why Teams Use XIDL

  • One contract drives multiple protocols and outputs.
  • HTTP and JSON-RPC live in the same interface system instead of separate toolchains.
  • Streaming and security annotations stay attached to the contract, not scattered across framework code.
  • Specs, SDKs, stubs, examples, and tests can all be generated from the same IDL.
  • Structured contracts are easier for automation, agents, and interactive tools to reason about.

Core Capabilities

  • Interface-first development with OMG IDL-compatible foundations and XIDL extensions.
  • Protocol mappings for HTTP and JSON-RPC, plus stream-oriented workflows.
  • Generated outputs for Rust, TypeScript, C, C++, OpenAPI, and OpenRPC.
  • Security-aware contracts including HTTP auth and API key mappings.
  • Formatting support through xidlc fmt.
  • Editor and language tooling through idl-language-server.
  • Interactive HTTP exploration from IDL, including launching client workflows with tools such as Scalar.

What One IDL Produces

XIDL generated outputs

One XIDL contract can radiate into runtime surfaces, generated SDKs, machine readable specs, and implementation assets that stay aligned because they come from the same source.

What You Can Build

  • HTTP services and generated clients from one IDL contract.
  • JSON-RPC services and generated clients from the same modeling approach.
  • OpenAPI and OpenRPC specs that stay aligned with implementation contracts.
  • Stream-oriented APIs with shared contract semantics.
  • Contract-driven examples, tests, and review flows.

How Teams Use XIDL

XIDL workflow

Teams author and review the contract once, then generate the artifacts they need to build servers, ship clients, publish specs, and keep examples and tests synchronized.

Quick Start

Install xidlc:

cargo install xidlc

Format IDL files:

xidlc fmt --inplace api.idl

Use this repository as a pre-commit hook:

repos:
  - repo: https://github.com/xidl/xidl
    rev: v0.31.0
    hooks:
      - id: xidlc-fmt

Generate Rust types:

xidlc gen --out-dir out rust api.idl

Generate an Axum HTTP surface:

xidlc gen --out-dir out rust-axum api.idl

Generate OpenAPI:

xidlc gen --out-dir generated openapi api.idl

Documentation

Ecosystem

Status

HTTP and JSON-RPC are available today. Stream support exists and continues to evolve, especially in the more advanced transport and interactive workflows.