bytecodealliance / bytecodealliance/wit-bindgen
c++ bindgen issues (resources/imports/includes)
- Dominant language
- Rust
- Stars
- 1.5k
- Forks
- 286
- Avg merge
- 6h 32m
- Merged PRs (30d)
- 19
Description
## Summary
This issue buckets multiple problems to avoid opening many separate issues at once.
Each sub-item is independently reproducible and causes the generated C++ to fail to compile.
If you prefer, I can split this bucket into separate issues.
## Environment
- wit-bindgen-cli: 0.47.0
- OS: Ubuntu 22.04.5 LTS (x86_64)
clang command: `clang++ -c "$OUT/w.cpp" -I"$OUT" -o "$OUT/w.o"`
## Details
### Sub-issue 1
C++ fails to compile.
#### Reproduction
```
package demo:poc;
interface host {
resource r;
}
world w {
import host;
use host.{r};
export take: func(x: r);
}
```
### Sub-issue 2
missing `wit.h`
#### Reproduction
```
package demo:poc;
interface i {
resource r;
f: func(x: borrow);
}
world w {
export i;
}
```
### Sub-issue 3
C++ fails to compile.
#### Reproduction
```
package demo:poc;
interface i {
resource r;
take-many: func(xs: list>);
}
world w {
import i;
}
```
### Sub-issue 4
C++ fails to compile.
#### Reproduction
```
package demo:poc;
world w {
export f: func() -> result;
}
```
### Sub-issue 5
C++ fails to compile.
#### Reproduction
```
package demo:poc;
world w {
record t {
x: u32,
}
import foo: func(x: t);
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.