Show HN: Titan – JavaScript-first framework that compiles into a Rust server
Posted by soham_byte 5 days ago
Hi HN,
I built Titan, a backend framework where you write routes and logic in JavaScript, and the CLI compiles everything into a single Rust + Axum binary using the Boa JS engine. No Node.js is required in production.
The idea is to keep JS developer experience while getting Rust performance and a self-contained deployable server.
Current features:
JS route DSL
Action system mapped to Rust
esbuild bundling
Generated Rust server with Axum
Hot-reload dev server
Single-binary output
Repo: https://github.com/ezet-galaxy/-ezetgalaxy-titan
Would love feedback on the architecture, DX, and whether this hybrid JS→Rust approach is useful.
Thanks for reading!
Comments
Comment by wavemode 3 hours ago
It's not clear to me how this would have better performance than plain Node.js, which is a C++ binary using the V8 JS engine.
It looks like you're handling routing in Rust, but this seems unlikely to move the needle measurably. In fact, it could be hurting you - you're basically betting that the rust program (route request + invoke JS interpreter + marshal data) is faster than the much simpler JavaScript program (route request). That doesn't seem likely.
Comment by denys_potapov 20 minutes ago
“Without a clear indicator of the author’s intent, any parodic or sarcastic expression of extreme views can be mistaken by some readers for a sincere expression of those views.”
[1] https://dev.to/denyspotapov/porting-is-odd-npm-to-ocaml-usin...
Comment by tigranbs 5 hours ago
For example, the https://github.com/SaynaAI/sayna has been mostly Claude Code + me reviewing the stuff + some small manual touches if needed, but for the most part, I have found that Claude Code writes way more stable Rust code than JS.
It would be easier and safer to give the JS code to a translator and have it translate it into Rust, and then continue AI Dev with Rust, than to invest time in an automated compiler from JS to Rust. IMHO!
Comment by pseudony 2 hours ago
However, I don’t see it that way at all. I find claude much more capable of writing large chunks of python or react/js frontend code than writing F#, a very statically type-checked language. It’s fine, but a lot more hand-holding is needed, a lot more tar pits visited.
If anything, it seems a popularity contest of which language features the most in training data. If AI assistance is the goal, everyone should write Python and Javascript.
Comment by k9294 1 hour ago
My experience also points to compiled languages that give immediate feedback on build. It’s nearly impossible to stop any AI agent from using 'as any' or 'as unknown as X'casts in TypeScript - LLMs will “fix” problems by sweeping them under the rug. The larger the codebase, the more review and supervision is required. TS codebase rots much faster then rust/C#/swift etc.
Comment by christophilus 20 minutes ago
Comment by Terretta 1 day ago
Is it that the two extra characters 'an' in 'titan' are so difficult to type for the CLI, or is it just for the giggles when you 'dev'?
Comment by ediatedia 34 minutes ago
Comment by jitl 5 hours ago
But Boa is very very slow compared to JIT compiled JavaScript. As soon as your business logic starts trying to stand up and walk I think you’ll start hitting request latency sadness.
Comment by Jean-Papoulos 2 hours ago
Comment by pavelai 3 hours ago
What's about code and DX: it's not a good practice to export anything using globals, this is what JS world refused to do long ago. It turns your code into a hardly debuggable mess quickly
Comment by jeswin 2 hours ago
There's a JS to Rust transpiler? How? If this is true, this is the most impressive part. The web server/framework almost irrelevant.
The AI generated documentation is very confusing.
Comment by Jaxan 1 hour ago
Comment by css_apologist 5 hours ago
const body = JSON.stringify({
model: "gpt-4.1-mini",
messages: [{ role: "user", content: "hii" }]
});
const r = t.fetch("https://api.openai.com/v1/chat/completions", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body
});
const json = JSON.parse(r.body);
.. no async? i wonder how they are doing this & how they plan on more js interopComment by alltheuuu 1 hour ago
Murderous, wretched and evil Rust proponents will censor, downplay and distract from this post. These murderous Rust proponents already know that they deserve worse than hell.
Comment by phplovesong 51 minutes ago
Comment by waterTanuki 5 hours ago
Comment by isuckatcoding 5 hours ago
Second, how does concurrency (like promises) translate to rust ?