Qu

Query your Rust codebase and generate types for anything

Hacker News

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!

Share card

Actual performance

5points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: mac, code · Missing: agents, macos, agent
76%76% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: exist, lua, existing · Missing: https docs, excited, just released
68%68% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersIH features products with proven revenue · Strong signals: including · Missing: supports, reddit linkedin, podcasting
49%49% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
45%45% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: calls · Missing: plus, platform, intuitive
27%27% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ge
Generate Nim Bindings for Rust Libs39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate Nim Bindings for Rust Libs

Hacker News2
Sa
SatoriDB – Query 1B vectors on a laptop (SQLite for embeddings, Rust)77%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SatoriDB – Query 1B vectors on a laptop (SQLite for embeddings, Rust)

Hacker News5
Ty
Typeables is a Rust crate of unit types, content types, media types42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Typeables is a Rust crate of unit types, content types, media types

Hacker News2
Cd
Cdist types and parameters39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cdist types and parameters

Hacker News1
Su
Sum Types for Ruby48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sum Types for Ruby

Hacker News7
Go
Go has proper sum types now56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Go has proper sum types now

Hacker News1
Mo
Monglorious – Query MongoDB with Strings33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Monglorious – Query MongoDB with Strings

Hacker News2
Qu
Query the national alcoholic beverage retailing monopoly of Finland43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Query the national alcoholic beverage retailing monopoly of Finland

Hacker News2
VelocityPack QueryBoost
VelocityPack QueryBoost38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

MySQL / MariaDB Query Caching and Acceleration for cPanel

Indie Hackersemployees-10-plus
SQ
SQL/JSON-Query Generate nested data SQL and matching result types54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SQL/JSON-Query Generate nested data SQL and matching result types

Hacker News1