Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Dart deferred loading meta issue

未关闭
#7,726 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
wasm

调研方向

首先阅读五个相关 issue,然后检查 wasm-opt、wasm-merge 和 wasm-split 在当前多模块延迟加载工作流中的使用方式。当 Binaryen 具备一种明确且可用的方法,能够集中优化拆分后的模块,同时不破坏加载过程或失去预期的代码大小改进时,这项工作就完成了。

由索引模型根据 Issue 内容生成。

描述

The Dart team is experimenting with using binaryen tools to support our deferred loading feature for users targeting wasm. We currently have experimental support for the feature by having the compiler emit multiple modules.

Typically, when emitting a single module, we use wasm-opt with the --closed-world flag to optimize the wasm module that dart2wasm is emitting. This works well for us and sometimes produces 3x code size improvements as well as other structural improvements like inlining, devirtualization, DCE, etc.

Now with deferred loading we are now splitting that single module into many modules that collectively represent the same program. So we technically still have a closed world... but split across multiple modules. Ideally we could specify all these modules to wasm-opt and it would perform the same (or close to the same) optimizations collectively across all these modules. Today wasm-opt doesn't support anything like this.

I've tried implementing this using a combination of wasm-merge -> wasm-opt -> wasm-split but ran into several issues where the code didn't load and the code size didn't improve much.

Associated issues:
https://github.com/WebAssembly/binaryen/issues/7725
https://github.com/WebAssembly/binaryen/issues/7724
https://github.com/WebAssembly/binaryen/issues/7723
https://github.com/WebAssembly/binaryen/issues/7722
https://github.com/WebAssembly/binaryen/issues/7721

主要语言
WebAssembly
星标
8.6k
派生
892
平均合并
2 天 2 小时
30 天内合并 PR
86

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

WebAssembly/binaryen 的其他 Issue

查看 WebAssembly/binaryen 的全部 Issue

相似的 Issue

更多 Compilers Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。