bytecodealliance / bytecodealliance/wit-bindgen

Allow user to override component type custom section name (or else generate a random name)

Open
#788 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.5k
Forks
286
Avg merge
6h 32m
Merged PRs (30d)
19

Description

Currently, `wit-bindgen` generates the custom section name using the format "component-type:{world_name}". This can lead to issues when linking separately-compiled code together, each containing code built from `wit-bindgen` code using the same world, because `wasm-ld` will concatenate identically-named custom sections together, resulting in something `wit-component` can't parse.

This came up while adding WASI Preview 2 support to `wasi-libc` based on `wit-bindgen`-generated C bindings and then later linking libc.a into a program that also uses `wit-bindgen`-generated bindings targeting the same world. Ideally, `wasi-libc` would use a custom section name with a big random name that's unlikely to conflict with application code.

Alternatively, `wit-bindgen` could just generate a big random name by default.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.