{"id":13617775,"url":"https://github.com/bytecodealliance/wasm-tools","last_synced_at":"2026-04-02T20:19:31.499Z","repository":{"id":37025505,"uuid":"265302687","full_name":"bytecodealliance/wasm-tools","owner":"bytecodealliance","description":" CLI and Rust libraries for low-level manipulation of WebAssembly modules ","archived":false,"fork":false,"pushed_at":"2026-03-24T22:26:28.000Z","size":22881,"stargazers_count":1721,"open_issues_count":125,"forks_count":324,"subscribers_count":25,"default_branch":"main","last_synced_at":"2026-03-26T21:51:09.974Z","etag":null,"topics":["wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytecodealliance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-19T16:35:08.000Z","updated_at":"2026-03-24T22:26:32.000Z","dependencies_parsed_at":"2023-10-11T07:08:17.896Z","dependency_job_id":"c7ed8331-3cb6-4a95-98d2-6d657894a62c","html_url":"https://github.com/bytecodealliance/wasm-tools","commit_stats":{"total_commits":2547,"total_committers":132,"mean_commits":"19.295454545454547","dds":"0.49705535924617195","last_synced_commit":"892d4b6ef074688fb673ed634741316e0ea455f4"},"previous_names":[],"tags_count":899,"template":false,"template_full_name":null,"purl":"pkg:github/bytecodealliance/wasm-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasm-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasm-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasm-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasm-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytecodealliance","download_url":"https://codeload.github.com/bytecodealliance/wasm-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fwasm-tools/sbom","scorecard":{"id":260283,"data":{"date":"2025-08-11","repo":{"name":"github.com/bytecodealliance/wasm-tools","commit":"3391156cee997660f992bdd09ca758a429d3a494"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 21 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/playground.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/publish.yml:12","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release-process.yml:20","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is not required on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.236.0 not signed: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/235714213","Warn: release artifact v1.235.0 not signed: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/225211026","Warn: release artifact v1.234.0 not signed: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/224409687","Warn: release artifact v1.233.0 not signed: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/222903589","Warn: release artifact v1.232.0 not signed: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/221382746","Warn: release artifact v1.236.0 does not have provenance: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/235714213","Warn: release artifact v1.235.0 does not have provenance: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/225211026","Warn: release artifact v1.234.0 does not have provenance: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/224409687","Warn: release artifact v1.233.0 does not have provenance: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/222903589","Warn: release artifact v1.232.0 does not have provenance: https://api.github.com/repos/bytecodealliance/wasm-tools/releases/221382746"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: RustCargoFuzzer integration found: crates/wasm-smith/src/lib.rs:28","Info: RustCargoFuzzer integration found: crates/wit-parser/fuzz/fuzz_targets/parse.rs:3","Info: RustCargoFuzzer integration found: fuzz/fuzz_targets/run.rs:7"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Binary-Artifacts","score":0,"reason":"binaries present in source code","details":["Warn: binary detected: crates/wasm-compose/tests/compositions/component-incorrect-version/a.wasm:1","Warn: binary detected: crates/wasmparser/benches/bz2.wasm:1","Warn: binary detected: crates/wasmparser/benches/intgemm-simd.wasm:1","Warn: binary detected: crates/wasmparser/benches/lots-of-empty-fn-types.wasm:1","Warn: binary detected: crates/wasmparser/benches/lots-of-unique-fn-types.wasm:1","Warn: binary detected: crates/wasmparser/benches/pulldown-cmark.wasm:1","Warn: binary detected: crates/wasmparser/benches/spidermonkey.wasm:1","Warn: binary detected: crates/wit-component/libdl.so:1","Warn: binary detected: crates/wit-parser/tests/ui/kinds-of-deps/deps/e.wasm:1","Warn: binary detected: tests/cli/wat2wasm-alias.wat.stdout:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:128: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:158: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:175: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:319: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:328: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:211: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:313: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:224: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:300: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:381: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:116: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:147: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:198: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playground.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/playground.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playground.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/playground.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/playground.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/playground.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playground.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/playground.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playground.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/playground.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/playground.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/playground.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release-process.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/bytecodealliance/wasm-tools/release-process.yml/main?enable=pin","Warn: containerImage not pinned by hash: ci/docker/aarch64-linux/Dockerfile:1: pin your Docker image by updating ubuntu:16.04 to ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6","Warn: containerImage not pinned by hash: ci/docker/aarch64-musl/Dockerfile:1: pin your Docker image by updating ghcr.io/cross-rs/aarch64-unknown-linux-musl to ghcr.io/cross-rs/aarch64-unknown-linux-musl@sha256:702154f52b2d8091671aa2c84d5582d849f949977228c735ff8462f93cc0e1e4","Warn: containerImage not pinned by hash: ci/docker/x86_64-linux/Dockerfile:1: pin your Docker image by updating almalinux:8 to almalinux:8@sha256:2d4abdee2caecd851d2d6591dfb2205ba18549bc080ad5377875c990331e41c4","Warn: containerImage not pinned by hash: ci/docker/x86_64-musl/Dockerfile:3","Warn: containerImage not pinned by hash: ci/docker/x86_64-musl/Dockerfile:8: pin your Docker image by updating ubuntu:24.04 to ubuntu:24.04@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9","Info:   0 out of  23 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   5 containerImage dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2024-0384","Warn: Project is vulnerable to: RUSTSEC-2025-0046 / GHSA-fm79-3f68-h2fc","Warn: Project is vulnerable to: RUSTSEC-2021-0060","Warn: Project is vulnerable to: RUSTSEC-2021-0059","Warn: Project is vulnerable to: GHSA-2rxc-gjrp-vjhx","Warn: Project is vulnerable to: RUSTSEC-2024-0404","Warn: Project is vulnerable to: GHSA-hxf5-99xg-86hw","Warn: Project is vulnerable to: RUSTSEC-2021-0064","Warn: Project is vulnerable to: RUSTSEC-2024-0421 / GHSA-h97m-ww89-6jmq","Warn: Project is vulnerable to: RUSTSEC-2020-0168","Warn: Project is vulnerable to: RUSTSEC-2024-0019 / GHSA-r8w9-5wcg-vfj7","Warn: Project is vulnerable to: RUSTSEC-2024-0436","Warn: Project is vulnerable to: RUSTSEC-2020-0056","Warn: Project is vulnerable to: GHSA-rr8g-9fpq-6wmg","Warn: Project is vulnerable to: RUSTSEC-2025-0023","Warn: Project is vulnerable to: GHSA-q8hx-mm92-4wvg","Warn: Project is vulnerable to: RUSTSEC-2024-0438 / GHSA-c2f5-jxjv-2hh8","Warn: Project is vulnerable to: GHSA-9ghp-w2hm-vfpf","Warn: Project is vulnerable to: RUSTSEC-2024-0442","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T10:41:30.930Z","repository_id":37025505,"created_at":"2025-08-17T10:41:30.930Z","updated_at":"2025-08-17T10:41:30.930Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31257622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-31T18:32:52.363Z","status":"ssl_error","status_checked_at":"2026-03-31T18:32:51.507Z","response_time":111,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["wasm","webassembly"],"created_at":"2024-08-01T20:01:47.844Z","updated_at":"2026-04-02T20:19:31.465Z","avatar_url":"https://github.com/bytecodealliance.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003ewasm-tools\u003c/code\u003e\u003c/h1\u003e\n\n\u003cstrong\u003eA \u003ca href=\"https://bytecodealliance.org/\"\u003eBytecode Alliance\u003c/a\u003e project\u003c/strong\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eCLI and Rust libraries for low-level manipulation of WebAssembly modules\u003c/strong\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n# Installation\n\n[Precompiled artifacts built on CI][artifacts] are available for download for\neach release.\n\n[artifacts]: https://github.com/bytecodealliance/wasm-tools/releases\n\nTo build from source first [install Rust for your\nplatform](https://www.rust-lang.org/tools/install) and then use the included\nCargo package manager to install:\n\n```\n$ cargo install --locked wasm-tools\n```\n\nAlternatively if you use [`cargo\nbinstall`](https://github.com/cargo-bins/cargo-binstall) then that can be used\nto install [the precompiled artifacts][artifacts] instead:\n\n```\n$ cargo binstall wasm-tools\n```\n\nInstallation can be confirmed with:\n\n```\n$ wasm-tools --version\n```\n\nSubcommands can be explored with:\n\n```\n$ wasm-tools help\n```\n\n# Examples\n\nBasic validation/printing/parsing:\n\n```sh\n# Validate a WebAssembly file\n$ wasm-tools validate foo.wasm\n\n# Validate a WebAssembly module in the text format, automatically converting to\n# binary.\n$ wasm-tools validate foo.wat\n\n# Validate a WebAssembly file enabling an off-by-default feature\n$ wasm-tools validate foo.wasm --features=exception-handling\n\n# Validate a WebAssembly file with a default-enabled feature disabled\n$ wasm-tools validate foo.wasm --features=-simd\n\n# Print the text format of a module to stdout\n$ wasm-tools print foo.wasm\n\n# Convert a binary module to text\n$ wasm-tools print foo.wasm -o foo.wat\n\n# Convert a text module to binary\n$ wasm-tools parse foo.wat -o foo.wasm\n```\n\nSimple mutation as well as piping commands together:\n\n```sh\n# Mutate a WebAssembly module and print its text representation to stdout\n$ wasm-tools mutate foo.wasm -t\n\n# Mutate a WebAssembly module with a non-default seed and validate that the\n# output is a valid module.\n$ wasm-tools mutate foo.wasm --seed 192 | wasm-tools validate\n\n# Demangle Rust/C++ symbol names in the `name` section, strip all other custom\n# sections, and then print out what binary sections remain.\n$ wasm-tools demangle foo.wasm | wasm-tools strip | wasm-tools objdump\n```\n\nWorking with components:\n\n```sh\n# Print the WIT interface of a component\n$ wasm-tools component wit component.wasm\n\n# Convert WIT text files to a binary-encoded WIT package, printing the result to\n# stdout\n$ wasm-tools component wit ./wit -t\n\n# Convert a WIT document to JSON\n$ wasm-tools component wit ./wit --json\n\n# Round trip WIT through the binary-encoded format to stdout.\n$ wasm-tools component wit ./wit --wasm | wasm-tools component wit\n\n# Convert a core WebAssembly binary into a component. Note that this requires\n# WIT metadata having previously been embedded in the core wasm module.\n$ wasm-tools component new my-core.wasm -o my-component.wasm\n\n# Convert a core WebAssembly binary which uses WASI to a component.\n$ wasm-tools component new my-core.wasm -o my-component.wasm --adapt wasi_snapshot_preview1.reactor.wasm\n```\n\n### CLI Conventions\n\nThere are a few conventions that all CLI commands adhere to:\n\n* All subcommands print \"short help\" with `-h` and \"long help\" with `--help`.\n* Input is by default read from stdin if no file input is specified (when\n  applicable).\n* Output is by default sent to stdout if a `-o` or `--output` flag is not\n  provided. Binary WebAssembly is not printed to a tty by default, however.\n* Commands which output WebAssembly binaries all support a `-t` or `--wat` flag\n  to generate the WebAssembly text format instead.\n* A `-v` or `--verbose` flag can be passed to enable log messages throughout the\n  tooling. Verbosity can be turned up by passing the flag multiple times such as\n  `-vvv`.\n* Color in error messages and console output is enabled by default for TTY based\n  outputs and can be configured with a `--color` argument.\n\n# Tools included\n\nThe `wasm-tools` binary internally contains a number of subcommands for working\nwith wasm modules and component. Many subcommands also come with Rust crates\nthat can be use programmatically as well:\n\n| CLI | Rust Crate | Playground | Description |\n|------|------|--------|------------|\n| `wasm-tools validate` | [wasmparser] |  | Validate a WebAssembly file |\n| `wasm-tools parse` | [wat] and [wast] | [parse](https://bytecodealliance.github.io/wasm-tools/parse) | Translate the WebAssembly text format to binary |\n| `wasm-tools print` | [wasmprinter] | [print](https://bytecodealliance.github.io/wasm-tools/print) | Translate the WebAssembly binary format to text |\n| `wasm-tools smith` | [wasm-smith] |  | Generate a valid WebAssembly module from an input seed |\n| `wasm-tools mutate` | [wasm-mutate] |  | Mutate an input wasm file into a new valid wasm file |\n| `wasm-tools shrink` | [wasm-shrink] |  | Shrink a wasm file while preserving a predicate |\n| `wasm-tools dump` |   |  | Print debugging information about the binary format |\n| `wasm-tools objdump` |   |  | Print debugging information about section headers |\n| `wasm-tools strip` |   |  | Remove custom sections from a WebAssembly file |\n| `wasm-tools demangle` |   |  | Demangle Rust and C++ symbol names in the `name` section |\n| `wasm-tools compose` | [wasm-compose] |  | Compose wasm components together (*deprecated*) |\n| `wasm-tools component new` | [wit-component] |  | Create a component from a core wasm binary |\n| `wasm-tools component wit` |  |  | Extract a `*.wit` interface from a component |\n| `wasm-tools component embed` |  |  | Embed a `component-type` custom section in a core wasm binary |\n| `wasm-tools component unbundle` |  |  | Extract core wasm modules from a component |\n| `wasm-tools metadata show` |  [wasm-metadata] |  | Show name and producer metadata in a component or module |\n| `wasm-tools metadata add` |  |  | Add name or producer metadata to a component or module |\n| `wasm-tools addr2line` |  |  | Translate wasm offsets to filename/line numbers with DWARF |\n| `wasm-tools completion` |  |  | Generate shell completion scripts for `wasm-tools` |\n| `wasm-tools json-from-wast` |  |  | Convert a `*.wast` file into JSON commands |\n| `wasm-tools wast` |  |  | Validate the structure of a `*.wast` file |\n\n[wasmparser]: https://crates.io/crates/wasmparser\n[wat]: https://crates.io/crates/wat\n[wast]: https://crates.io/crates/wast\n[wasmprinter]: https://crates.io/crates/wasmprinter\n[wasm-smith]: https://crates.io/crates/wasm-smith\n[wasm-mutate]: https://crates.io/crates/wasm-mutate\n[wasm-shrink]: https://crates.io/crates/wasm-shrink\n[wit-component]: https://crates.io/crates/wit-component\n[wasm-compose]: https://crates.io/crates/wasm-compose\n[wasm-metadata]: https://crates.io/crates/wasm-metadata\n\nThe `wasm-tools` CLI contains useful tools for debugging WebAssembly modules and\ncomponents. The various subcommands all have `--help` explainer texts to\ndescribe more about their functionality as well.\n\n# WebAssembly proposals\n\nThis repository strives to implement any standardized proposal to WebAssembly.\nAll proposals that are [Stage 4+](https://github.com/WebAssembly/proposals) are\nenabled by default in validation. Support in the text format is always enabled\nat all times for all proposals.\n\nCurrently implemented proposals in this repository that are stage 4+ are:\n\n* [x] [annotations](https://github.com/WebAssembly/annotations)\n* [x] [branch-hinting](https://github.com/WebAssembly/branch-hinting)\n* [x] [bulk-memory](https://github.com/WebAssembly/bulk-memory-operations)\n* [x] [component-model](https://github.com/WebAssembly/component-model) (note\n  this is an exception, it's not stage4+ but is on-by-default)\n* [x] [exceptions](https://github.com/WebAssembly/exceptions)\n* [x] [extended-const](https://github.com/WebAssembly/extended-const)\n* [x] [extended-name-section](https://github.com/WebAssembly/extended-name-section)\n  (note this is not phase 4 but `wast` does not have the concept of features)\n* [x] [function-references](https://github.com/WebAssembly/function-references)\n* [x] [gc](https://github.com/WebAssembly/gc)\n* [x] [memory64](https://github.com/WebAssembly/memory64)\n* [x] [multi-memory](https://github.com/WebAssembly/multi-memory)\n* [x] [multi-value](https://github.com/WebAssembly/multi-value)\n* [x] [mutable-global](https://github.com/WebAssembly/mutable-global)\n* [x] [reference-types](https://github.com/WebAssembly/reference-types)\n* [x] [relaxed-simd](https://github.com/WebAssembly/relaxed-simd)\n* [x] [saturating-float-to-int](https://github.com/WebAssembly/nontrapping-float-to-int-conversions)\n* [x] [sign-extension-ops](https://github.com/WebAssembly/sign-extension-ops)\n* [x] [simd](https://github.com/WebAssembly/simd)\n* [x] [tail-call](https://github.com/WebAssembly/tail-call)\n* [x] [threads](https://github.com/WebAssembly/threads)\n* [x] [wat-numeric-values](https://github.com/WebAssembly/wat-numeric-values)\n  (note this is not phase 4 but `wast` does not have the concept of features)\n\nThese proposals are implemented but have not yet reached stage 4. This means\nthey are disabled by default in validation and their implementation may change\nover time as the proposal evolves. Additionally the proposal may also have\nchanged since these proposals were implemented, so there may be a mismatch too.\n\n* [x] [custom-page-sizes](https://github.com/WebAssembly/custom-page-sizes)\n* [x] [memory-control](https://github.com/WebAssembly/memory-control)\n* [x] [shared-everything-threads](https://github.com/WebAssembly/shared-everything-threads)\n* [x] [stack-switching](https://github.com/WebAssembly/stack-switching)\n* [x] [wide-arithmetic](https://github.com/WebAssembly/wide-arithmetic)\n\n# Libraries\n\nAs mentioned above many of the tools of the `wasm-tools` CLI have libraries\nimplemented in this repository as well. These libraries are:\n\n* [**`wasmparser`**](crates/wasmparser) - a library to parse WebAssembly binaries\n* [**`wat`**](crates/wat) - a library to parse the WebAssembly text format\n* [**`wast`**](crates/wast) - like `wat`, except provides an AST\n* [**`wasmprinter`**](crates/wasmprinter) - prints WebAssembly binaries in their\n  string form\n* [**`wasm-mutate`**](crates/wasm-mutate) - a WebAssembly test case mutator\n* [**`wasm-shrink`**](crates/wasm-shrink) - a WebAssembly test case shrinker\n* [**`wasm-smith`**](crates/wasm-smith) - a WebAssembly test case generator\n* [**`wasm-encoder`**](crates/wasm-encoder) - a crate to generate a binary\n  WebAssembly module\n* [**`wit-parser`**](crates/wit-parser) - a crate to parse and manage `*.wit`\n  files and interfaces.\n* [**`wit-encoder`**](crates/wit-encoder) - a crate to generate `*.wit` files and\n  interfaces.\n* [**`wit-component`**](crates/wit-component) - a crate to create components\n  from core wasm modules.\n* [**`wit-smith`**](crates/wit-smith) - a `*.wit` test case generator.\n* [**`wasm-metadata`**](crates/wasm-metadata) - a crate to read and manipulate\n  WebAssembly metadata\n\nIt's recommended to use the libraries directly rather than the CLI tooling when\nembedding into a separate project.\n\n# C/C++ bindings\n\nUsing the `CMakeLists.txt` in `crates/c-api`, `wasm-tools` can be used from the\n[`wasm-tools.h` header](crates/c-api/include/wasm-tools.h). Note that these\nbindings do not comprehensively cover all the functionality of this repository\nat this time, but please feel free to contribute more if you find functions\nuseful!\n\n# Versioning and Releases\n\nThis repository has both a CLI and a suite of crates that is published to\ncrates.io (Rust's package manager). The versioning scheme used by this\nrepository looks like:\n\n* `wasm-tools` - the CLI follows the versioning pattern of `1.X.Y`. Frequently\n  `Y` is 0 and `X` is bumped as part of a release for this repository.\n* `wat` - this Rust crate is versioned at `1.X.Y` as well and matches the\n  `wasm-tools` version.\n* `wast` - this Rust crate is versioned as `X.0.Y`. The `X` here matches the `X`\n  in `1.X.Y` of `wasm-tools`.\n* All other crates - all other crates in this repository are versioned at\n  `0.X.Y` where `X` matches the `1.X.Y` of `wasm-tools`.\n\nNote that the `Y` of all the versions above will also match for any release of\nthis repository. This versioning scheme is intended to reflect the stable nature\nof the CLI and the `wat` crate in terms of API stability. Other crates, however,\nall receive a major version bump that are not automatically considered API\ncompatible on all releases. This reflects how WebAssembly itself is an evolving\nstandard which is not an unchanging foundation. All of the crates in this\nrepository are suitable for \"production use\" but be aware that API stability is\nnot guaranteed over time. If you have difficulty upgrading versions please feel\nfree to file an issue and we can help out.\n\nAlso, this repository does not currently have a strict release cadence. Releases\nare done on an as-needed basis. If you'd like a release done please feel free to\nreach out on [Zulip], file an issue, leave a comment on a PR, or otherwise\ncontact a maintainer.\n\n[Zulip]: https://bytecodealliance.zulipchat.com/\n\nFor maintainers, the release process looks like:\n\n* Go to [this link](https://github.com/bytecodealliance/wasm-tools/actions/workflows/release-process.yml)\n* Click on \"Run workflow\" in the UI.\n* Use the default `bump` argument and hit \"Run workflow\"\n* Wait for a PR to be created by CI. You can watch the \"Actions\" tab for if\n  things go wrong.\n* When the PR opens, close it then reopen it. Don't ask questions.\n* Review the PR, approve it, then queue it for merge.\n\nThat should be it, but be sure to keep an eye on CI in case anything goes wrong.\n\n## Patch Release Process\n\nPatch releases aren't too frequent so the process is a bit more involved at this\ntime. The basic idea is the same though as a normal release:\n\n* Determine that you're going to make a patch release for the release of\n  `wasm-tools` version `1.N.0`.\n* If `N` is the latest version on `main`, or basically if a major release hasn't\n  happened since `N`, then land changes on `main` first. Then go to [this\n  link](https://github.com/bytecodealliance/wasm-tools/actions/workflows/release-process.yml)\n  and run the workflow against the `main` branch with `bump-patch` as an\n  argument. Double-check all changes from the `v1.N.0` tag to ensure that no\n  breaking changes in any crate have landed.\n* If `N` is not the latest version on `main`, then create a new branch in the\n  repository named `release-N` starting from the `v1.N.0` tag. Next land changes\n  as PRs against this branch, and note that CI may not have been run in awhile\n  so it may need some fixes. Then run the same workflow as above against the\n  `release-N` branch with the `bump-patch` argument. Again double-check that no\n  breaking changes have been made.\n\nBasically a `release-N` may need to be manually created if the `main` branch has\nmoved beyond `N`. After that though it should work basically the same where a\nworkflow is run and a PR is merged and that's all that's necessary.\n\n# Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for more information about contributing\nto this repository.\n\n# License\n\nThis project is triple licenced under the Apache 2/ Apache 2 with LLVM exceptions/ MIT licences. The reasoning for this is:\n- Apache 2/ MIT is common in the rust ecosystem.\n- Apache 2/ MIT is used in the rust compiler, and some of this code may be migrated there.\n- Some of this code may be used in compiler output, and the Apache 2 with LLVM exceptions licence is useful for this.\n\nFor more details see\n- [Apache 2 Licence](LICENSE-APACHE)\n- [Apache 2 Licence with LLVM exceptions](LICENSE-Apache-2.0_WITH_LLVM-exception)\n- [MIT Licence](LICENSE-MIT)\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this project by you, as defined in the Apache 2/ Apache 2 with LLVM exceptions/ MIT licenses,\nshall be licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":["Rust","Tool development"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fwasm-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytecodealliance%2Fwasm-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fwasm-tools/lists"}