Resource Static Methods Cause Build Failure When Imported
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust, wasm
調査の方向性
添付された min-ex.zip から開始し、cargo component build で exporter をビルドしてから importer をビルドし、static resource の検証エラーを再現します。importer の static method のケースと通常の method のケースを比較します。importer が正常にビルドされ、static resource の import が維持されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hey all, I ran into an issue where I couldn't import static resource functions which were defined in another wasm component. I have a minimal example attached as a zip file below.
In the project, I have an cdylib called exporter that exports a single wit resource, called 'my-resource' with a single static method called 'get-static' which returns a string. I also have an project called importer that creates an executable that imports the resource with the static method. I find that when I build the importing package, I get the following error:
error: failed to validate component output
Caused by:
export name `[static]my-resource.get-static` is not valid
static resource name is not known in this context (at offset 0xb)
This issue doesn't happen when I change the static method to a normal method. Any idea what's going wrong here?
The steps to reproduce using the package below are as follows:
- unzip the folder.
cd exportercargo component build. You should see this output:
Generating bindings for exporter (src\bindings.rs)
Compiling wit-bindgen-rt v0.24.0
Compiling exporter v0.1.0 (C:\Users\bnhei\source\min-ex\exporter)
Finished dev [unoptimized + debuginfo] target(s) in 1.72s
Creating component target\wasm32-wasi\debug\exporter.wasm
cd ../importercargo component build. You should see this output:
Compiling wit-bindgen-rt v0.24.0
Compiling importer v0.1.0 (C:\Users\bnhei\source\min-ex\importer)
Finished dev [unoptimized + debuginfo] target(s) in 1.57s
Creating component target\wasm32-wasi\debug\importer.wasm
error: failed to validate component output
Caused by:
export name `[static]my-resource.get-static` is not valid
static resource name is not known in this context (at offset 0xb)
- 主要言語
- Rust
- スター
- 593
- フォーク
- 68
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/cargo-component のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
bytecodealliance/cargo-component#399 · コメント 2 件 ·
bytecodealliance/cargo-component の issue をすべて見る
似ている issue
-
[Bug] AM Context Monitor (am-monitor): Session turns count is capped at 80 due to turns.slice(-80)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
lbjlaq/Antigravity-Manager#4180 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
zizmorcore/zizmor#2608 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
longbridge/nsh#4201 ·
メンテナーはふだん 1 日以内に返信