编程与软件工程w3.org
WebAssembly 2.0 规范
WASM 2.0
2022 — 2025,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 W3C 的 WebAssembly 2.0 核心规范,收录了自 1.0 发布以来被采纳的多项扩展提案。页面概述了相对 1.0 的变化,是了解 WASM 语言演进的权威文档。
为什么经久不衰:作为 WebAssembly 标准的正式规范,它定义了浏览器和边缘计算中广泛使用的字节码格式,多年后仍是理解 WASM 能力边界的权威参考。
HN 评论精选
质疑 WASM 的性能优势是否兑现,指出它如今更多作为通用运行时而非提速手段
WebAssembly 真的比 JavaScript 快吗?有好的基准测试吗?我找到 Daniel Lemire 2018 年的一篇,结论似乎是快不了多少,但 2018 年的数据可能已过时。奇怪的是,WASM 最初是为了通过缓存指令(以及显式内存管理、整数类型)获得性能提升,但现在很少听到性能方面的讨论了。人们更多把它当作通用平台,或在浏览器里跑 C/C++ 代码(如 tree-sitter、CPython、Ruby),或用于边缘计算和智能合约引擎——这些场景用 JVM 也一样能做到。
eatonphil查看英文原文
Is WebAssembly faster than JavaScript? Any good benchmarks you can link me to? I found one of Daniel Lemire's [0] from 2018 which seems to suggest it's basically not much faster. 2018 is long enough away from now though that this post may not be relevant. I don't know. It's odd to me how WebAssembly seemed to be started as a way to get performance improvements by working with cached instructions (and maybe also explicit memory management and integer types) but I don't hear much about performance these days. Maybe I'm not paying attention. Instead I hear more about it as a universal platform or a way you can run C/C++ code in the browser (like tree-sitter and CPython and Ruby, etc.). Or about people using it in edge compute or as the engine for smart contracts. In those ways you could just as well have used the JVM though. [0] https://lemire.me/blog/2018/10/23/is-webassembly-faster-than-javascript/
关注各子提案的归宿,认为组件模型带来的互操作性是 WASM 未来的关键
这些子项目最终会并入主规范,还是保持独立?GC、线程、原子操作、组件模型、接口类型……我不确定哪些会进规范、哪些会半独立发展。组件模型的相关 PR 感觉标志着 WebAssembly 第一个完整时代的开端:我们需要互操作性,WASM 需要真正可嵌入,之后才能理解它对世界的意义。(Rust 借 wasm-bindgen 抢了先,但让每种语言都重建一套 bindgen 系统并不合理,所以才有了 canonical ABI 和组件模型。)另外很期待每模块多表支持——基于能力的系统,给模块几个 SharedArrayBuffer 作为工作集来通信,这个想法很有吸引力。
rektide查看英文原文
Are subprojects intended to eventually make it into the main spec or do they remain standalone? GC, threads, atomics, component-model, interface-types... Im not sure what to expect to eventually make it into this spec & what will continue developmemt semi-independently. Personally https://github.com/WebAssembly/component-model/pull/23 feels like it marks the start of webassembly's first full era. We need interoperation, webassembly needs to really be embeddable, & only then can we really understand & explore what webassembly means to the world. (Rust got an early start with wasm-bindgen, doing all the lifting on their side, but it's not reasonable & only semi-interoperable having each language rebuild that bindgen system & abingor itself... hence canonical abi & component-model.) Edit: tux3 has a good comment linking the changelog, noting that indeed numberous specs have been integrated. https://news.ycombinator.com/item?id=31087610 Really excited for multiple table per module support! The idea of a capabilities based sort of system, where a module is handed a couple working sets of data as SharedArrayBuffers to work g communicate with, is quite compelling.
指出规范附录中有 1.0 到 2.0 的变更清单
我猜这个页面描述了自 1.0 以来的变化:规范里写着'自 WebAssembly 1.0 原始发布以来,许多扩展提案已被整合',变更附录链接在此。
tux3查看英文原文
I assume this page describes what changed since 1.0: Since the original release 1.0 of the WebAssembly specification, a number of proposals for extensions have been integrated. The following sections provide an overview of what has changed. https://webassembly.github.io/spec/core/appendix/changes.html
认为在没有破坏性变更的情况下称'2.0'略显随意
有意思,其中几个已采纳的提案正是我几年前硕士论文的课题。很高兴看到大版本发布,不过如果没有破坏性变更,这个版本号似乎有点随意(如果有破坏性变更那问题就大了)。
jacobmischka查看英文原文
Neat, a few of these accepted proposals were the topic of my Master's thesis a couple years ago: https://github.com/jacobmischka/uwm-masters-thesis Exciting to see a major release, though admittedly it seems a little arbitrary if there aren't any breaking changes (and very problematic if there are?).
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选