Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Interface with an overlapping name used internally will cause build error

オープン
#72 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust, wasm
領域
build-system

調査の方向性

WIT example を使って build を再現し、src/hyperlight_wasm_macro/src/wasmguest.rs の 90 行目付近を調査してから、src/component.rs から生成された use を追跡する。重複するインターフェース名によって生成される呼び出しがどのように変わるかを確認し、報告された E0107 および E0061 エラーなしで example がビルドできることを検証する。

索引モデルが issue の本文から書いたものです。

説明

lifecycle/confirmed

If you have a wit file with:

package wasi-sample:example;

world example {
  import host;
  export adder;
}

interface adder {
  add: func(left: u32, right: u32) -> u32;
  call-host-function: func(input: string);
}

interface host {
  host-function: func(input: string) -> string;
}

you will end up with errors

 Compiling hyperlight-wasm v0.1.0 (/home/jstur/projects/hyperlight-wasm/src/hyperlight_wasm)
error: failed to run custom build command for `hyperlight-wasm v0.1.0 (/home/jstur/projects/hyperlight-wasm/src/hyperlight_wasm)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/jstur/projects/hyperlight-wasm/target/debug/build/hyperlight-wasm-f9324c725c3b4d6a/build-script-build` (exit status: 101)
  --- stdout
  cargo::rerun-if-changed=/home/jstur/projects/hyperlight-wasm/src/wasm_runtime
  cargo::rerun-if-env-changed=WIT_WORLD

....

 warning: unused import: `hyperlight_guest_bin::host_comm::call_host_function`
    --> src/component.rs:31:5
     |
  31 | use hyperlight_guest_bin::host_comm::call_host_function;
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: `#[warn(unused_imports)]` on by default

  error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
    --> src/component.rs:41:1
     |
  41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 0 generic arguments
     |
  note: function defined here, with 0 generic parameters
    --> src/component.rs:41:1
     |
  41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: this error originates in the macro `hyperlight_wasm_macro::wasm_guest_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

  error[E0061]: this function takes 1 argument but 3 arguments were supplied
    --> src/component.rs:41:1
     |
  41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     | |
     | expected `&FunctionCall`, found `&str`
     | unexpected argument #2 of type `core::option::Option<Vec<ParameterValue>>`
     | unexpected argument #3 of type `ReturnType`
     |
     = note: expected reference `&FunctionCall`
                found reference `&'static str`
  note: function defined here
    --> src/component.rs:41:1
     |
  41 | hyperlight_wasm_macro::wasm_guest_bindgen!();
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: this error originates in the macro `hyperlight_wasm_macro::wasm_guest_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

looks like this might be caused because the relative call here:

https://github.com/hyperlight-dev/hyperlight-wasm/blob/40ef9e38821fa296bac9d2fdca4ce168c410a388/src/hyperlight_wasm_macro/src/wasmguest.rs#L90

主要言語
Rust
スター
728
フォーク
39
平均マージ
2日 3時間
マージ済み PR(30日)
25

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hyperlight-dev/hyperlight-wasm のほかの issue

hyperlight-dev/hyperlight-wasm の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。