I have an existing project which I started with wit-bindgen 0.53.0. I've made a PR to improve the export! macro's syntax: https://github.com/bytecodealliance/wit-bindgen/pull/1566
However, I've just rebased my fork with the latest changes from main branch, and now my code which depends on my fork is failing to compile with a linker error:
error: linking with `cc` failed: exit status: 1
...
= note: rust-lld: error: /tmp/rustcKOnqtc/list:3: ; expected, but got @
>>> cabi_post_umari:projector/projector@0.1.0#[method]projector.query;
>>> ^
collect2: error: ld returned 1 exit status
My code was previously working just fine, and I don't think my PR is causing this? Is this a known issue, or a new bug I've introduced? I really can't identify how my PR could've caused this so I'm left to assume the rebase is the cause.
Is that linker failure when compiling for native or when compiling for wasm?
Oh actually compiling for native Linux. Targeting wasm32-wasip2, I get some different errors:
ebhook_registration.rlib(schedule_webhook_registration.c4fvsoeyuh4xq6yvxpv8azxg4.0vim629.rcgu.o)
>>> defined in /target/wasm32-wasip2/debug/deps/librecord_web
hooks_registered.rlib(record_webhooks_registered.93ajckws7joqssdjt9av24y0t.16pvxeh.rcgu.o)
rust-lld: error: duplicate symbol: query
>>> defined in /target/wasm32-wasip2/debug/deps/libschedule_w
ebhook_registration.rlib(schedule_webhook_registration.c4fvsoeyuh4xq6yvxpv8azxg4.0vim629.rcgu.o)
>>> defined in /target/wasm32-wasip2/debug/deps/librecord_web
hooks_registered.rlib(record_webhooks_registered.93ajckws7joqssdjt9av24y0t.16pvxeh.rcgu.o)
I can confirm this isn't due to my PR.. and its not caused by 0.55.0 (or 0.54.0). Its when I do cargo build --workspace instead of cargo build -p my_crate.
Perhaps a regression of https://github.com/bytecodealliance/wit-bindgen/issues/849 ?
(deleted)
Hm so in theory even when compiling for native it shouldn't be too much of a problem, but that also seems bad that's it's error'ing out for wasm targets too
that being said though this looks pretty dependent on project structure and such, so would you be up for creating a reproduction and filing an issue for this?
I could do, but the project which has a bunch of the wit code isn't public yet so it might take some time for me to build a reproduction. I'll update here if I get the opportunity to do so.
Last updated: Apr 12 2026 at 23:10 UTC