Stream: git-wasmtime

Topic: wasmtime / issue #14332 Bindings generation with named-im...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 15:59):

alexcrichton opened issue #14332:

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 https://github.com/bytecodealliance/wasmtime/pull/14275#pullrequestreview-5181298415

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 15:59):

alexcrichton added the wasm-proposal:component-model label to Issue #14332.


Last updated: Sep 20 2026 at 18:08 UTC