#wasm #section #binaries #tool #command-line-tool #modify #wasm-binary

app wasmadder

A CLI Tool for modifying WebAssembly binaries

2 releases

new 0.1.4 Dec 13, 2024
0.1.3 Dec 13, 2024
0.1.2 Dec 13, 2024
0.1.1 Dec 13, 2024
0.1.0 Dec 13, 2024

#416 in Command line utilities

Download history 506/week @ 2024-12-09

506 downloads per month

MIT/Apache

6KB
66 lines

wasmadder

wasmadder is a tiny command-line tool for adding data to custom sections in WebAssembly binaries.

Features

  • Add data to a custom section in a WebAssembly binary
  • Specify input and output files

Installation

Build from source using Cargo:

git clone https://github.com/yourusername/wasmadder.git
cd wasmadder
cargo build --release

Usage

wasmadder add --input <input.wasm> --data <data.bin> --section <section_name> --output <output.wasm>

Arguments

  • -i, --input: Input WebAssembly binary file (required)
  • -d, --data: Data file to be added (required)
  • -s, --section: Custom section name (required)
  • -o, --output: Output WebAssembly file (required)

Example

wasmadder add \
  --input input.wasm \
  --data data.bin \
  --section my_custom_section \
  --output output.wasm

This command first compresses then adds the contents of

data.bin

into the custom section my_custom_section of

input.wasm

and saves the result as

output.wasm

.

License

This project is licensed under the MIT License or the Apache License 2.0, at your option.

Dependencies

~3MB
~60K SLoC