{"id":15684158,"url":"https://github.com/xtuc/wasm-edit","last_synced_at":"2025-05-07T15:09:17.054Z","repository":{"id":62407091,"uuid":"554842250","full_name":"xtuc/wasm-edit","owner":"xtuc","description":"Edit and instrument already compiled Wasm binaries","archived":false,"fork":false,"pushed_at":"2023-05-27T17:05:24.000Z","size":58,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T15:09:10.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/wasm-edit","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xtuc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-20T13:45:07.000Z","updated_at":"2024-08-16T07:29:21.000Z","dependencies_parsed_at":"2023-02-13T23:16:42.388Z","dependency_job_id":null,"html_url":"https://github.com/xtuc/wasm-edit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtuc%2Fwasm-edit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtuc%2Fwasm-edit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtuc%2Fwasm-edit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtuc%2Fwasm-edit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtuc","download_url":"https://codeload.github.com/xtuc/wasm-edit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902613,"owners_count":21822261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T17:11:48.201Z","updated_at":"2025-05-07T15:09:17.023Z","avatar_url":"https://github.com/xtuc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasm-edit\n\n\u003e Edit and instrument already compiled Wasm binaries\n\n## Coredump generation\n\nMoved to https://github.com/xtuc/wasm-coredump.\n\n## Install\n\n```\ncargo install wasm-edit\n```\n\n## Edit the main memory\n\nChange the initial memory amount (in pages):\n```\nwasm-edit edit-memory --initial-memory=1000 \u003c input.wasm \u003e output.wasm\n```\n\n## Trace calls to `memory.grow`\n\nTrace calls to the `memory.grow` instruction:\n```\nwasm-edit instrument-memory \u003c input.wasm \u003e output.wasm\n```\n\nRequires Wasi, but doesn't require any change on the host.\nTested with Rust and theoretically working with C/C++ (clang).\n\n## Running into stack overflow\n\nSome Wasm binaries have very recursive flow of control, increase the maximum stack size:\n```\n$ ulimit -s 160000\n```\n\n[wasmgdb]: https://github.com/xtuc/wasmgdb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtuc%2Fwasm-edit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtuc%2Fwasm-edit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtuc%2Fwasm-edit/lists"}