nowfound

Life & fun · June 26, 2025

I built a JSON-RPC library for Zig with compile time reflection

Doing dynamic dispatching in a strict static typing language is hard. Something as simple as, map.put("add", add); map.put("hello", hello); fn add(a: i32, b: i32) i32 { return a + b; } fn hello() []const u8 { return "Hello World"; } is impossible because the value type of key/value of the map needs to be the same but all the function types are different. Calling functions with different number of parameters, different parameter types, and different return type dynamically is difficult. Other languages either use dynamic typing, runtime reflection, macro, or passing in one big generic…

I built a JSON-RPC library for Zig with compile time reflection launched on June 26, 2025 with 13 votes, #1,425 of 7,999 launches that month and more than 75% of that year's launches. The site was still online in September 2026, 1 year on.

Visit github.com ↗Alternativestop 18% of June 2025

In plain words

ZigJR is a JSON-RPC library for the Zig programming language that solves dynamic function dispatching in a statically-typed environment. It uses Zig's compile-time reflection capabilities to automatically determine function signatures, parameter types, and return types, then packages them into uniformly typed call objects. The library is designed for developers working with Zig who need to call functions with varying parameters and return types through a single dynamic interface.

written from the facts on this page · September 2026

From the sources

A Lightweight Zig Library for JSON-RPC 2.0. Contribute to williamw520/zigjr development by creating an account on GitHub.

In the maker’s words, at launch

Doing dynamic dispatching in a strict static typing language is hard. Something as simple as, map.put("add", add); map.put("hello", hello); fn add(a: i32, b: i32) i32 { return a + b; } fn hello() []const u8 { return "Hello World"; } is impossible because the value type of key/value of the map needs to be the…

Does a similar job

all alternatives →
  • I'm making a dynamic language in Rust2022 · github.com · ▲184

    An implementation of a dynamic programming language in Rust. Includes: Parser/Compiler, REPL, Virtual Machine, Bytecode Disassembler This started out as a learning project to teach myself Rust. It has grown into a decently substantial piece of software and I've learned quite a bit in the process! Some neat things: + A garbage collector that can store dynamically sized types without any double-indirection (i.e. I have my own Box implementation with manual alloc/dealloc) + The smart pointer used to reference GCed data is a thin pointer. The ptr metadata needed for DSTs is stored in…

  • Error return traces for Go, inspired by Zig2023 · github.com · ▲133

    An alternative to stack traces for your Go errors. Contribute to bracesdev/errtrace development by creating an account on GitHub.

  • Buzz, strongly typed scripting language written in Zig2022 · github.com · ▲140

    👨‍🚀 buzz, A small/lightweight statically typed scripting language - buzz-language/buzz

  • HyperLogLog in Zig2023 · github.com · ▲154

    Zig library for HyperLogLog estimation. Contribute to axiomhq/zig-hyperloglog development by creating an account on GitHub.

  • ZD
    Zig-DbC – A design by contract library for Zig2025 · ▲46

    Hi everyone, I've made an open-source library for using design by contract (DbC) principles in the Zig programming language. It's called Zig-DbC, and it currently provides the following features: - A simple API to define preconditions, postconditions, and invariants. - Contracts are active in `Debug`, `ReleaseSafe`, and `ReleaseSmall` modes to catch bugs early. - All checks are removed at compile time in `ReleaseFast` mode for zero performance cost. - An optional mode to handle partial state changes in functions that return errors. - Transparent error handling that propagates errors from…

  • A Fast, Malloc-Free C++14 Json Parser and Encoder2014 · github.com · ▲98

    Meta programming utilities for C++14. Merged in matt-42/lithium - matt-42/iod

More life & fun this month

the category →

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, June 2025

the whole month →
  • IM

    Hey HN! Pilots everywhere are required to keep a logbook of all their flying hours, aircraft, airports, and so on. Since I track everything digitally (some people still just use paper logbooks!), I put together some data visualizations and a few 3D globes to show my flying history. This globe is probably my favourite so far: https://jameshard.ing/pilot/globes/all If you’ve got ideas for other graphs or ways to show this kind of data, I’d love to hear them!

    Life & fun · 2025 · jameshard.ing

  • Stunning presentations with AI. No design skills required.

    AI · 2025 · chroniclehq.com

  • Build native mobile apps for iOS and Android without code.

    Dev tools · 2025 · bble.io

  • Twenty▲989

    Build your Enterprise CRM with an AI-friendly SDK

    Dev tools · 2025 · twenty.com

  • All your connections, across all your socials.

    AI · 2025 · pally.com

  • I was the main contributor to workout.lol, an open-source fitness app to easily build a workout routine. The project had traction (1.4k GitHub stars, 95 forks, ~20K visits/month), but was eventually sold due to video licensing hurdles. The new owner stopped maintaining it, and the repo went abandoned. Over the next 9 months, I sent 15 emails to try to save it : no replies. Feature requests & issues were ignored. The community was left with a "broken" tool let's say. I couldn't just let it die So I built the new version from scratch with the same open-source spirit, but a better…

    Dev tools · 2025 · github.com