This example:
wasmtime::component::bindgen!({
inline: "
package wasmtime:test;
world test {
import a: wasi:sockets/network@0.2.12;
}
",
path: "src/p2/wit",
world: "wasmtime:test/test",
with: {
"wasi:sockets/network": wasmtime_wasi::p2::bindings::sockets::network,
},
named_imports: {
"wasi:sockets/network": wasmtime_wasi::NamedId,
},
});
fails with:
error[E0616]: field `network_error_code` of struct `wasmtime_wasi::p2::bindings::sockets::network::LinkOptions` is private
--> crates/wasi/tests/all/p2/async_.rs:580:1
|
580 | / wasmtime::component::bindgen!({
581 | | inline: "
582 | | package wasmtime:test;
... |
595 | | },
596 | | });
| |__^ private field
|
= note: this error originates in the macro `wasmtime::component::bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
help: a method `network_error_code` also exists, call it with parentheses
|
596 | })(_);
Originally reported at #14275 (review)
This example:
fails with:
Originally reported at #14275 (review)