bytecodealliance / bytecodealliance/wit-bindgen
No longer able to generate bindings in submodule
- Dominant language
- Rust
- Stars
- 1.5k
- Forks
- 286
- Avg merge
- 6h 32m
- Merged PRs (30d)
- 19
Description
The following works in the latest release but not on main:
```wit
package my-ns:my-package;
interface my-interface {
my-func: func();
}
world my-world {
import my-interface;
export my-interface;
}
```
```rust
mod bindings {
wit_bindgen::generate!({
path: "wit",
});
}
use bindings::exports::my_ns::my_package::my_interface::Guest;
bindings::export!(Impl);
struct Impl;
impl Guest for Impl {
fn my_func() {}
}
```
On the main, the following error shows:
```
error[E0433]: failed to resolve: could not find `export` in the crate root
--> src/lib.rs:3:5
|
3 | / wit_bindgen::generate!({
4 | | path: "wit",
5 | | });
| |______^ could not find `export` in the crate root
...
10 | bindings::export!(Impl);
| ----------------------- in this macro invocation
```
Seems we're now assuming something lives at the crate root which we did not assume before.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.