bytecodealliance / bytecodealliance/wasm-tools
Feature Request: Add the ability to add user defined Custom Sections to wasm modules.
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 351
- Avg merge
- 16h 57m
- Merged PRs (30d)
- 38
Description
## Problem
Not all language toolchains and ecosystems offer consistent or complete support for WASM custom sections during compilation. The lack of standard compiler support for readily embedding user-defined metadata into a module's custom section limits the ability of users to attach essential data for post-processing, tooling, or runtime use. This limitation necessitates an external, dedicated utility to manage this metadata.
## Feature Proposal
Add a new command, or a set of subcommands under an existing utility (e.g., wasm-tools custom-section or under mutations), to enable users to manage a WASM module's custom sections.
- add/edit: Insert a new custom section or replace the contents of an existing custom section by name.
- remove: Delete a specified custom section by name.
- list: Display the names and associated data sizes of all custom sections within a module.
---
#### History
- [Question about the feature](https://github.com/bytecodealliance/wasm-tools/issues/2348#issuecomment-3398215252)
- [issue where mutate seems to have partial functionality for this described](https://github.com/bytecodealliance/wasm-tools/issues/415)
Contributor guide
Assessment
This issue has not been assessed yet.