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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

WASM 2.0

303 点作者 lioeters大约 19 小时前

16 条评论

lioeters大约 19 小时前
Announcement post in March 2025 summarizes the changes from WASM 1.0.<p>Wasm 2.0 Completed - <a href="https:&#x2F;&#x2F;webassembly.org&#x2F;news&#x2F;2025-03-20-wasm-2.0&#x2F;" rel="nofollow">https:&#x2F;&#x2F;webassembly.org&#x2F;news&#x2F;2025-03-20-wasm-2.0&#x2F;</a><p>&gt; ..here is the summary of the additions in version 2.0 of the language:<p>Vector instructions: With a massive 236 new instructions — more than the total number Wasm had before — it now supports 128-bit wide SIMD (single instruction, multiple data) functionality of contemporary CPUs, like Intel’s SSE or ARM’s SVE. This helps speeding up certain classes of compute-intense applications like audio&#x2F;video codecs, machine learning, and some cryptography.<p>Bulk memory instructions: A set of new instructions allows faster copying and initialization of regions of memory or ranges of tables.<p>Multi-value results: Instructions, blocks, and functions can now return more than one result value, sometimes supporting faster calling conventions and avoiding indirections. In addition, block instructions now also can have inputs, enabling new program transformations.<p>Reference types: References to functions or pointers to external objects (e.g., JavaScript values) become available as opaque first-class values. Tables are repurposed as a general storage for such reference values, and new instructions allow accessing and mutating tables in Wasm code. In addition, modules now may define multiple tables of different types.<p>Non-trapping conversions: Additional instructions allow the conversion from float to integer types without the risk of trapping unexpectedly.<p>Sign extension instructions: A new group of instructions allows directly extending the width of signed integer value. Previously that was only possible when reading from memory.
评论 #43935442 未加载
评论 #43937942 未加载
评论 #43936260 未加载
评论 #43938151 未加载
评论 #43935262 未加载
pdubroy大约 16 小时前
The WebAssembly spec is quite approachable, but for anyone who is interested in learning Wasm and <i>doesn&#x27;t</i> want to read the spec —<p>WebAssembly from the Ground Up (<a href="https:&#x2F;&#x2F;wasmgroundup.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wasmgroundup.com&#x2F;</a>) an online book to learn Wasm by building a simple compiler in JavaScript. It starts with handcrafting bytecodes in JS, and then slowly builds up a simple programming language that compiles to Wasm.<p>There&#x27;s a free sample available: <a href="https:&#x2F;&#x2F;wasmgroundup.com&#x2F;book&#x2F;contents-sample&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wasmgroundup.com&#x2F;book&#x2F;contents-sample&#x2F;</a><p>(Disclaimer: I&#x27;m one of the authors)
评论 #43936007 未加载
评论 #43935723 未加载
inoffensivename大约 13 小时前
I&#x27;ve been working on Webassembly runtimes for the last year or so, specifically on spec compliance and performance. I came to it as a neophyte, but I&#x27;ve become quite fond of the specification. It&#x27;s a bit hard to get started with the notation, but it&#x27;s refreshing to have such a thoroughly specified language. There is a reference interpreter generated directly from the spec, which is very useful for resolving questions about what a runtime should do in a given situation.<p>The provided specification tests allow implementers to be confident that their runtime conforms to the spec.<p>Overall I think it&#x27;s an impressive specification and is worth studying .
nenaoki大约 3 小时前
The Wasm Constant Time proposal was just moved to inactive 4 days ago[0].<p>From what I can tell the bulk of the work for it was done in 2018[1], but it needs updating to consider SIMD, and for legwork to be done on moving it along as a proper spec extension.<p>Until someone picks up this valuable work and lands this much-needed feature in Wasm, we&#x27;re extremely vulnerable to timing attacks in all Wasm crypto.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;proposals&#x2F;blob&#x2F;9fc7a85e&#x2F;inactive-proposals.md">https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;proposals&#x2F;blob&#x2F;9fc7a85e&#x2F;inact...</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;PLSysSec&#x2F;ct-wasm">https:&#x2F;&#x2F;github.com&#x2F;PLSysSec&#x2F;ct-wasm</a>
treetalker大约 17 小时前
Wasm, per footnote 1:<p>&gt; A contraction of “WebAssembly”, not an acronym, hence not using all-caps.
评论 #43936194 未加载
评论 #43936315 未加载
评论 #43936382 未加载
mountainriver大约 7 小时前
Is there a list of working WASM apps in the wild?<p>I like the idea of WASM but it often feels like DAPPs. This kinda fun idea that nothing is actually based on, maybe I’m wrong
评论 #43941343 未加载
AlexAltea大约 13 小时前
Great release with many welcome features. As a nit, I&#x27;m rather disappointed at the inclusion of fixed-size SIMD (128-bit wide) instead of adaptive SIMD instructions letting the compiler maximize SIMD width depending on host capabilities, similar to how ARM SVE works.
评论 #43936500 未加载
评论 #43937838 未加载
rossant大约 15 小时前
Can C functions returning structs by value be compiled to WASM?
评论 #43936667 未加载
anentropic大约 15 小时前
Are any of the runtimes already implementing this?
评论 #43935834 未加载
BuckRogers大约 10 小时前
A bytecode for the web was a dream for a very long time.<p>As a C# developer who appreciates Blazor being on the cutting edge with WASM from early on, I&#x27;m looking forward to WASM 2.0&#x27;s changed being added. .NET has a massive jump on this and I think it&#x27;s one of the better bets they&#x27;ve taken.
Klasiaster大约 13 小时前
What&#x27;s truly missing for Wasm and WASI to be an alternative to POSIX is dynamic instatiation so that a Wasm program&#x2F;component can start another Wasm program&#x2F;component by providing the bytecode at runtime. So far I don&#x27;t think anyone is working on that.
评论 #43937459 未加载
评论 #43938263 未加载
评论 #43937810 未加载
评论 #43937072 未加载
aleksi大约 16 小时前
Curious that Editor&#x27;s Draft has &quot;bikeshed&quot; in the URL.
评论 #43935562 未加载
iFire大约 13 小时前
I got blocked writing high level wasm bindings with types other than int or float, is this still the case?
评论 #43937483 未加载
canadiantim大约 12 小时前
Can WASM be considered &quot;safer&quot; than pure javascript?
评论 #43942710 未加载
评论 #43937517 未加载
评论 #43938321 未加载
Dabbling_Dion大约 16 小时前
DOA.<p>Without direct browser support for WASM with DOM access ( and no need for JavaScript &quot;shim&quot;), all this is futile.
评论 #43935752 未加载
评论 #43935657 未加载
评论 #43935885 未加载
评论 #43935837 未加载
评论 #43935557 未加载
评论 #43936172 未加载
TekMol大约 16 小时前
I&#x27;m still skeptical about the whole Wasm ordeal.<p>If you want to run code written in other languages in the browser, you could just as well compile to JavaScript.<p>All Wasm brings to the table is a bit of a speed improvement.
评论 #43935921 未加载
评论 #43935547 未加载
评论 #43936529 未加载
评论 #43935807 未加载
评论 #43935843 未加载
评论 #43936306 未加载
评论 #43937926 未加载
评论 #43938498 未加载
评论 #43937590 未加载