TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: TinyWasm – A tiny WebAssembly Runtime written in Rust

172 点作者 explodingcamera大约 1 年前
Show HN: TinyWasm - A tiny WebAssembly Runtime written in Rust<p>Hi HN! I&#x27;m excited to share TinyWasm (<a href="https:&#x2F;&#x2F;github.com&#x2F;explodingcamera&#x2F;tinywasm">https:&#x2F;&#x2F;github.com&#x2F;explodingcamera&#x2F;tinywasm</a>), a WebAssembly Interpreter I developed for my final university project.<p>The main goal of this project was to deepen my understanding of WebAssembly and interpreter design. TinyWasm successfully passes all the official WebAssembly 1.0 tests and also includes features from future proposals such as like bulk memory operations.<p>Initially more of a research project, TinyWasm focuses on simplicity and portability. It has minimal third-party dependencies, a small codebase, and is compatible with no_std environments. It&#x27;s now available as a standalone library (<a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;tinywasm" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;tinywasm</a>), and I hope it can be useful for embedding into other projects and hacking on, especially because it&#x27;s designed to be easy to understand and modify, while still being decently performant.<p>I&#x27;m looking forward to feedback, hope you find it useful!

7 条评论

rrampage大约 1 年前
Super nice project! I also spent the last month writing a WASM interpreter ( <a href="https:&#x2F;&#x2F;github.com&#x2F;rrampage&#x2F;wart">https:&#x2F;&#x2F;github.com&#x2F;rrampage&#x2F;wart</a> ) using Java 21. I started it as an excuse to try out the pattern matching in switch &#x2F; sealed classes in Java. It kind of snowballed in scope and can now run Doom and Waforth ( <a href="https:&#x2F;&#x2F;github.com&#x2F;remko&#x2F;waforth">https:&#x2F;&#x2F;github.com&#x2F;remko&#x2F;waforth</a> )! Have not yet tried compiling it to WASM and running it as a meta-circular interpreter.
news_to_me大约 1 年前
I’ve been working through the WebAssembly spec recently and it’s pretty interesting, there are many design aspects I wouldn’t have chosen.<p>Was there anything about the spec that was surprising or frustrating to you?
评论 #39634861 未加载
Sytten大约 1 年前
It would be interesting to have benchmarks in memory usage et performance versus the big projects like wasmtime and wasmer. There are quite a few interpreters in rust these days!<p>Did you plan for possible spec extension like WASI?
评论 #39629915 未加载
评论 #39630514 未加载
mleonhard大约 1 年前
Thanks for sharing your project! How does performance change when the `unsafe` feature is disabled?<p>It looks like there is only one usage of `unsafe` outside of the no_std build: <a href="https:&#x2F;&#x2F;github.com&#x2F;explodingcamera&#x2F;tinywasm&#x2F;blob&#x2F;c50bae752f3e788faf66b376d065374cc4085931&#x2F;crates&#x2F;tinywasm&#x2F;src&#x2F;store&#x2F;memory.rs#L192">https:&#x2F;&#x2F;github.com&#x2F;explodingcamera&#x2F;tinywasm&#x2F;blob&#x2F;c50bae752f3...</a>
评论 #39636077 未加载
abricq大约 1 年前
Looks quite interesting ! Since this was done as a university project, did you have to write a report ? If you did and that it can be shared, I would love to go through it
评论 #39631293 未加载
ledgerdev大约 1 年前
This looks excellent. Since this is a university project, what future plans&#x2F;hopes do you have for the project?
fermigier大约 1 年前
Great job. Some benchmarks would be interesting, but I can&#x27;t contribute ATM.
评论 #39629578 未加载