Crates.io | wasm-cs |
lib.rs | wasm-cs |
version | 1.0.0 |
source | src |
created_at | 2023-11-13 07:09:13.723447 |
updated_at | 2023-11-13 07:09:13.723447 |
description | Read and write custom sections in WASM modules. |
homepage | https://github.com/leighmcculloch/wasm-cs |
repository | https://github.com/leighmcculloch/wasm-cs |
max_upload_size | |
id | 1033345 |
size | 17,992 |
Read and write custom sections in WASM modules.
cargo install --locked wasm-cs
$ wasm-cs file.wasm ls
hello (6 bytes)
test (47 bytes)
$ wasm-cs file.wasm read SECTION_NAME
Length: 47 (0x2f) bytes
0000: 54 68 65 20 71 75 69 63 6b 20 62 72 6f 77 6e 20 The quick brown
0010: 66 6f 78 20 6a 75 6d 70 73 20 6f 76 65 72 20 74 fox jumps over t
0020: 68 65 20 6c 61 7a 79 20 64 6f 67 2e 2e 2e 0a he lazy dog....
$ wasm-cs file.wasm read SECTION_NAME -f hex
54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f672e2e2e0a
$ wasm-cs file.wasm read SECTION_NAME -f base64
VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4uLgo=
$ wasm-cs file.wasm read SECTION_NAME -f binary
The quick brown fox jumps over the lazy dog...
$ wasm-cs file.wasm write SECTION_NAME < FILE
wasm-cs is a fork of wasm-custom-sections, by Sven Sauleau.
License: MIT