WebAssembly / WebAssembly/WASI
streams are not implemented in `wit-bindgen` for C bindings
Open
Nobody has claimed this yet.
P-http
S-inactive
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
If you try to generate bindings for 0.3.0 for C it fails:
RUST_BACKTRACE=1 wit-bindgen c --autodrop-borrows yes ./wasi-http/wit-0.3.0-draft -w client
thread 'main' panicked at crates/c/src/lib.rs:780:43:
not implemented
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: wit_bindgen_c::push_ty_name
4: wit_bindgen_c::gen_type_name
5: wit_bindgen_c::InterfaceGenerator::define_live_types
6: <wit_bindgen_c::C as wit_bindgen_core::WorldGenerator>::import_interface
7: wit_bindgen_core::WorldGenerator::generate
8: wit_bindgen::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I realize that this is actually a wit-bindgen issue, but I think C bindings should be a blocker for an 0.3.0 release.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the command against ./wasi-http/wit-0.3.0-draft with the C generator, then inspect crates/c/src/lib.rs around line 780 and the push_ty_name entry point shown in the backtrace. Done means wit-bindgen generates C bindings for the 0.3.0 streams case without the not implemented panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, rust
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100