展示HN:Titan Planet – 现在由V8驱动的JavaScript后端框架
嗨,HN,
Titan Planet 是一个以 JavaScript 为主的后端框架,允许你用 JavaScript 编写后端逻辑,并将其部署为一个单一的原生 Rust 二进制文件。
今天,我要分享一个重大更新:
**新功能**
1. **V8 运行时(不再使用 Boa)**
Titan Planet 现在使用 V8 来执行 JavaScript 包。这显著提高了执行速度、与现实世界 JS 库的兼容性以及整体运行时的稳定性,同时仍然完全不依赖 Node.js 进行生产环境。
JavaScript 在运行之前被打包,并在嵌入的 V8 运行时中执行。Rust 继续负责网络、异步 I/O、并发和部署。
2. **扩展的运行时 API**
Titan 现在配备了一套不断增长的内置运行时 API,专为后端工作负载设计:
- `t.log(...)` – 结构化日志记录
- `t.jwt` – JWT 签名/验证助手
- `t.password` – 哈希和验证助手
- `t.fetch` – HTTP 请求
- 文件访问、环境访问等
这些 API 在 Rust 端实现,并安全地暴露给 JavaScript,确保运行时的可控性和可预测性。
3. **相同的核心理念**
- 不使用 Node.js
- 不使用 Node 事件循环
- 生产环境中不需要 JS 工具
- 输出一个原生二进制文件
- JavaScript 严格限于应用逻辑
**文档**
文档(架构、运行时 API、示例):
[https://titan-docs-ez.vercel.app/docs](https://titan-docs-ez.vercel.app/docs)
Titan 在设计上是有主张的,并不适合所有用例——但如果你对一个由 Rust 驱动、具备 JavaScript 友好性和 V8 运行时的后端感兴趣,欢迎反馈。
祝编码愉快!
查看原文
Hi HN,
Titan Planet is a JavaScript-first backend framework that lets you write backend logic in JavaScript and deploy it as a single native Rust binary.<p>Today, I’m sharing a major update:<p>What’s new<p>1. V8 runtime (no more Boa) Titan Planet now uses V8 to execute JavaScript bundles. This significantly improves execution speed, compatibility with real-world JS libraries, and overall runtime stability — while still keeping Node.js completely out of production.<p>JavaScript is bundled ahead of time and executed inside an embedded V8 runtime. Rust continues to own networking, async I/O, concurrency, and deployment.<p>2. Expanded runtime APIs Titan now ships with a growing set of built-in runtime APIs designed for backend workloads:<p>t.log(...) – structured logging<p>t.jwt – JWT sign / verify helpers<p>t.password – hashing & verification helpers<p>t.fetch – HTTP requests<p>File access, env access, and more<p>These APIs are implemented on the Rust side and exposed safely to JavaScript, keeping the runtime controlled and predictable.<p>3. Same core philosophy<p>No Node.js<p>No Node event loop<p>No JS tooling required in production<p>One native binary output<p>JavaScript scoped strictly to application logic<p>Docs<p>Documentation (architecture, runtime APIs, examples):
<a href="https://titan-docs-ez.vercel.app/docs" rel="nofollow">https://titan-docs-ez.vercel.app/docs</a><p>Titan is opinionated by design and won’t fit every use case — but if you’re interested in a Rust-owned backend with JavaScript ergonomics and a V8 runtime, feedback is very welcome.<p>Happy coding.