-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Labels
gen-cRelated to the C code generatorRelated to the C code generator
Description
Summary
The C code generator in wit-bindgen panics with "duplicate symbols" error when processing valid WIT files that contain function names differing only in case.
Environment
- wit-bindgen version: 0.47.0
- Affected generator: C
- OS: Ubuntu 22.04, x86-64
Steps to Reproduce
-
Create a minimal WIT file
Save the following as
test.wit:package poc:demo; world example { export get-user: func() -> string; export GET-USER: func() -> string; }
-
Run wit-bindgen C generator
wit-bindgen c --out-dir /tmp/test test.wit
-
Observe the panic
thread 'main' panicked at crates/c/src/lib.rs:1899:38: duplicate symbols: "name `exports_example_get_user` already defined" note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace -
Verify Rust generator works correctly
wit-bindgen rust --out-dir /tmp/test_rust test.wit
Result: Successfully generates code without errors.
Metadata
Metadata
Assignees
Labels
gen-cRelated to the C code generatorRelated to the C code generator