TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: SSVM – Speed up your Node.js apps with Rust and WebAssembly

7 pointsby juntaoalmost 5 years ago

2 comments

juntaoalmost 5 years ago
Raw performance (the lack of) is always a contentious point for JavaScript, especially in our post-Moore era of computing. Node.js gets around this issue through extensive of use of native libraries and modules written in C, including the V8 JS engine itself.<p>But as application developers, how do YOU create high performance functions? Write in C and run as a NAPI module? Write in Rust and run as a V8 wasm? Well, there is another (better and faster) way now!<p>The SSVM is a fully featured WebAssembly VM (<a href="https:&#x2F;&#x2F;www.secondstate.io&#x2F;ssvm&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.secondstate.io&#x2F;ssvm&#x2F;</a>) that is optimized for server-side applications.<p>You can write functions in Rust, compile to WebAssembly and run in SSVM, and access it as if they are JS functions in Node.js. Easy as pie. Give it a try! (<a href="https:&#x2F;&#x2F;www.secondstate.io&#x2F;articles&#x2F;getting-started-with-rust-function&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.secondstate.io&#x2F;articles&#x2F;getting-started-with-rus...</a>)<p>By rewriting computationally intensive functions from JavaScript to Rust, developers could achieve 10x to 100x times performance (<a href="https:&#x2F;&#x2F;www.secondstate.io&#x2F;articles&#x2F;performance-rust-wasm&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.secondstate.io&#x2F;articles&#x2F;performance-rust-wasm&#x2F;</a>) gain in terms of startup and&#x2F;or execution speed.<p>BTW, Why not just use v8? For starters, SSVM runs much faster than V8 (<a href="https:&#x2F;&#x2F;www.secondstate.io&#x2F;articles&#x2F;ssvm-performance&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.secondstate.io&#x2F;articles&#x2F;ssvm-performance&#x2F;</a>) and it also supports more server-friendly extensions than just WASI.<p>Any issued and feedback are welcome. Checkout the GitHub link: <a href="https:&#x2F;&#x2F;github.com&#x2F;second-state&#x2F;SSVM" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;second-state&#x2F;SSVM</a>
评论 #23783624 未加载
jedisct1almost 5 years ago
Interesting project, but since this seems to be limited to Rust, what’s the point of WebAssembly, instead of writing JS extensions directly in Rust?
评论 #23782056 未加载