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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

WebAssembly Micro Runtime

228 点作者 ColinEberhardt大约 6 年前

12 条评论

chubot大约 6 年前
Cool. The whole repo is about 24K lines, and the vmcore_wasm dir is ~8300 lines.<p><pre><code> ~&#x2F;git&#x2F;languages&#x2F;wasm-micro-runtime$ find . -name &#x27;*.[ch]&#x27; |xargs wc -l |sort -n ... 472 .&#x2F;core&#x2F;iwasm&#x2F;runtime&#x2F;vmcore_wasm&#x2F;wasm-opcode.h 478 .&#x2F;core&#x2F;shared-lib&#x2F;utils&#x2F;runtime_timer.c 537 .&#x2F;core&#x2F;shared-lib&#x2F;platform&#x2F;zephyr&#x2F;bh_thread.c 581 .&#x2F;core&#x2F;iwasm&#x2F;runtime&#x2F;platform&#x2F;zephyr&#x2F;wasm_math.c 590 .&#x2F;core&#x2F;shared-lib&#x2F;mem-alloc&#x2F;ems&#x2F;ems_alloc.c 841 .&#x2F;core&#x2F;iwasm&#x2F;lib&#x2F;native-interface&#x2F;attr-container.c 893 .&#x2F;core&#x2F;iwasm&#x2F;lib&#x2F;native&#x2F;libc&#x2F;libc_wrapper.c 1220 .&#x2F;core&#x2F;iwasm&#x2F;runtime&#x2F;vmcore_wasm&#x2F;wasm-runtime.c 2160 .&#x2F;core&#x2F;iwasm&#x2F;runtime&#x2F;vmcore_wasm&#x2F;wasm-interp.c 2874 .&#x2F;core&#x2F;iwasm&#x2F;runtime&#x2F;vmcore_wasm&#x2F;wasm-loader.c 24534 total </code></pre> There is also a C++ VM here that’s ~7700 lines. I haven’t tried either one but it would be interesting to see how they compare!<p><a href="https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;wabt&#x2F;tree&#x2F;master&#x2F;src&#x2F;interp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;wabt&#x2F;tree&#x2F;master&#x2F;src&#x2F;interp</a><p><pre><code> ~&#x2F;git&#x2F;languages&#x2F;wabt&#x2F;src&#x2F;interp$ wc -l *.cc *.h 1863 binary-reader-interp.cc 3585 interp.cc 642 interp-disassemble.cc 740 interp-trace.cc 43 binary-reader-interp.h 735 interp.h 94 interp-internal.h 7702 total</code></pre>
kibwen大约 6 年前
Interesting, apparently WebAssembly is a relatively small spec to implement; someone at our local Rust usergroup has also shown off a WASM runtime that runs on microcontrollers.
评论 #19879961 未加载
snarfy大约 6 年前
How does this compare to Mozilla&#x27;s wasi? [1]<p>[1] - <a href="https:&#x2F;&#x2F;wasi.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wasi.dev&#x2F;</a>
评论 #19877509 未加载
grenoire大约 6 年前
Gosh, somebody should be proofreading that README. It seems a little unprofessional of Intel when I cannot understand what&#x27;s meant in certain sentences...
评论 #19876229 未加载
评论 #19876241 未加载
janekm大约 6 年前
I was wondering if it would be suitable for micro controllers (with let&#x27;s say a few hundred kB of memory, not MB). I can&#x27;t immediately find the answer but there appears to be a port to Zephyr OS in the repo so that is promising.<p>There&#x27;s also the beginnings of a sensor manager and API so clearly small embedded use cases are intended.<p>It&#x27;s still a very small project (looks like one contributor so far), but that&#x27;s no bad thing...
评论 #19876130 未加载
评论 #19876774 未加载
评论 #19877013 未加载
评论 #19876243 未加载
评论 #19876620 未加载
评论 #19876360 未加载
kbumsik大约 6 年前
I&#x27;m always interested in running WASM in microcontrollers, but AFAIK there is a severe limitation of WASM spec: the minimum size of heap (WASM memory page) is 64KiB, which is too big for many of microcontrollers. Otherwise a WASM module must run in stack-only mode.<p>Unless this problem is resolved I don&#x27;t think WASM can be adopt widely in the world of microcontrollers.
评论 #19882813 未加载
评论 #19878145 未加载
NonEUCitizen大约 6 年前
The README says &quot;small footprint&quot; but does not seem to mention what this is numerically?
cabalamat大约 6 年前
Big companies like Intel should be able to afford to pay technical writers whose native language is English. Consider:<p>&gt; WASM is already the LLVM official backend target<p>This implies that the only thing LLVM compiles to is WASM.<p>Better would be something like &quot;WASM is already an official LLVM backend target&quot; or &quot;LLVM already compiles to WASM&quot;.
评论 #19877818 未加载
评论 #19876587 未加载
评论 #19882595 未加载
pepijndevos大约 6 年前
Hold on... so if I implement a wasm runtime somewhere, I can compile random things for it. brb, writing wasm runtime for avr and z80
acqq大约 6 年前
Note:<p>“Features<p>WASM interpreter (AOT is planned)”<p>You’ll compile a program to have it interpreted at the end.<p>Does anybody know some specific case where this direction is advantageous?
评论 #19876639 未加载
评论 #19876646 未加载
评论 #19878985 未加载
ngcc_hk大约 6 年前
Seems quite interesting and hope to have more info about actual device.
no_identd大约 6 年前
Every time someone submits wasm related content, I feel obliged to link this classic talk:<p><a href="https:&#x2F;&#x2F;www.destroyallsoftware.com&#x2F;talks&#x2F;the-birth-and-death-of-javascript" rel="nofollow">https:&#x2F;&#x2F;www.destroyallsoftware.com&#x2F;talks&#x2F;the-birth-and-death...</a><p>Bernhardt, Gary – The Birth &amp; Death of JavaScript (PyCon 2014)
评论 #19876965 未加载
评论 #19877571 未加载