Show HN: Query your Rust codebase and generate types for anything

Show HN (score: 5)
Found: June 28, 2025
ID: 8

Description

Code Quality
Show HN: Query your Rust codebase and generate types for anything Hello HN!

As a long-time professional Rust developer. I've always been frustrated by the difficulty and "hackiness" of producing bindings to other languages, whether a frontend, an FFI library, etc.

Not just in Rust but in any language.

After many years of trying existing solutions and trying to make my own, I've finally developed a solution I'm very happy with.

RTK (aka Rust Type Kit) allows you to write Lua scripts that perform queries on your code, such as method calls to Axum's `.route`, function definitions, and more, and then receive rich type information including all argument types, function paths, proc macro attributes, and more.

Your Lua script can then read this information and emit an output file in any language of your choosing. Or, you can emit compiler errors and use it as a linter of sorts. You can even directly re-emit Rust code itself and use this as a richer proc macro solution!

The code example is a bit verbose, so I encourage you to take a look at the repo's README. I look forward to hearing your thoughts, or any usecases you may come up with!

More from Show

Show HN: Pi-hosts – Give the Pi coding agent access to your servers

Show HN: Pi-hosts – Give the Pi coding agent access to your servers I built that initially for an AI chat bot that allows teams to perform DevOps tasks straight out of Slack&#x2F;Teams (with proper permission control, obviously).<p>Useful to let developers perform mundane tasks, or help coordinate incident response.<p>I ended up using it myself on my own machine to manage Hetzner and AWS boxes. I thought that may be useful to others.<p>The default policy should be good enough, but if you don&#x27;t like living dangerously, you can set it to `paranoid`.<p>Install: `pi install npm:pi-hosts`<p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;hunvreus&#x2F;pi-hosts" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hunvreus&#x2F;pi-hosts</a>

Show HN: 49Agents – 2D Canvas IDE for Orchestrating Agents, Repos, Issues

Show HN: 49Agents – 2D Canvas IDE for Orchestrating Agents, Repos, Issues Beads tables (Steve Yegge&#x27;s) for issue tracking. Can view git trees, terminals, issue tables, notes, and files all on one screen. Can connect multiple machines via private network (like tailscale)

Show HN: ClusterdOS – Kubernetes without the platform team

Show HN: ClusterdOS – Kubernetes without the platform team

No other tools from this source yet.