csharp bindgen issues

Đang mở
#1,515 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@yowl đang làm issue này rồi.

Từ ngày 29/1/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

gen-c#

Summary

This issue buckets several problems in wit-bindgen csharp to avoid opening many separate issues at once.

Each sub-item is independently reproducible and makes the generated C# fail to build.

If you prefer, I can split this bucket into separate issues.

Repro template

WIT_BINDGEN=wit-bindgen
OUT=/tmp/wit-csharp
rm -rf "$OUT" && mkdir -p "$OUT"

"$WIT_BINDGEN" csharp --runtime native-aot --out-dir "$OUT" /tmp/CASE.wit

cat > "$OUT/Repro.csproj" <<'XML'
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
</Project>
XML

dotnet build -c Release "$OUT/Repro.csproj"

Sub-issues

Sub-issue 1
Reproduction
package local:demo;

world w {
  export i;
}

interface i {
  /// */
  record r {
    x: u32,
  }
}
Sub-issue 2
Reproduction
package local:demo;

world w {
  export i;
}

interface i {
  resource wasm-interop;

  foo: func(x: own<wasm-interop>);
}
Sub-issue 3
Reproduction
package local:demo;

world w {
  import i;
}

interface i {
  resource t-handle;
}
Sub-issue 4
Reproduction
package local:demo;

world w {
  export i;
}

interface i {
  resource r;
}
Sub-issue 5
Reproduction
package local:demo;

world w {
  import i;
}

interface i {
  foo: func(cleanups: string);
}
Sub-issue 6
Reproduction
package local:demo;

world w {
  export i;
}

interface i {
  foo: func(DELEGATE: u32);
}
Sub-issue 7
Reproduction
package local:demo;

world w {
  export i;
}

interface i {
  variant tags {
    a,
  }

  foo: func(x: tags);
}
Ngôn ngữ chính
Rust
Star
1.5k
Fork
306
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bytecodealliance/wit-bindgen

Tất cả issue của bytecodealliance/wit-bindgen

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.