Resolve builtins transitively
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 20/100
調査の方向性
Start at the main-instance composition entry point and trace how builtin imports are discovered and instantiated. Check how existing cycle errors are reported; the issue specifies depth-first traversal in declaration order, reuse of each builtin instance, and a cycle path in errors. Done means transitive builtins are shared among importers while non-builtin imports remain imports of the result; linked PR #15087 indicates work is already underway.
索引モデルが issue の本文から書いたものです。
説明
Feature
Allow transitive inclusion of compile-time builtins into composition graphs.
Benefit
As it stands, builtins are only composed in if a guest directly imports them. For example, in the case of layering higher-level builtins atop lower-level ones, the guest is forced to manually import all layers. After this change the guest only needs to import its direct dependencies, closing the abstraction leak.
Implementation
Starting at the main instance, walk depth-first in declaration order and discover builtins, instantiating as we go and reusing instances already created. A stack holding builtins currently being instantiated (i.e. having their imports resolved) is used to reject repeated names which result from cyclic imports. The stack from the repeated name onwards is the cycle path used for error reporting.
By instantiating each builtin once and sharing them among their importers, stateful builtins behave correctly and all importers observe the same state.
Imports that aren't builtins, including the unsafe intrinsics, are left alone and remain imports of the result, as they do now.
Alternatives
Leave it as-is; guests must explicitly name all builtins they use.
- 主要言語
- Rust
- スター
- 18.8k
- フォーク
- 1.9k
- 平均マージ
- 22時間 54分
- マージ済み PR(30日)
- 371
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/wasmtime のほかの issue
-
bug wasm-proposal:exceptions wasmtime:debugging
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bytecodealliance/wasmtime#14102 ·
メンテナーはふだん 1 日以内に返信
-
wasm-proposal:gc
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bytecodealliance/wasmtime#13808 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
bytecodealliance/wasmtime#15105 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug wasmtime:c-api wasmtime:docs
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
bytecodealliance/wasmtime#15088 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
wasm-proposal:component-model wasm-proposal:gc
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
bytecodealliance/wasmtime#15081 ·
メンテナーはふだん 1 日以内に返信
bytecodealliance/wasmtime の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
limitlessprojects/Go-Hybrid#3342 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
librespeed/speedtest-rust#52 · コメント 1 件 ·
-
enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bherbruck/solvecraft#11246 · コメント 1 件 · リアクション 1 件 ·
-
example
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rust-lang-nursery/rust-cookbook#954 ·
メンテナーはふだん 1 日以内に返信