{"id":16189942,"url":"https://github.com/brson/wasm-opt-rs","last_synced_at":"2025-04-05T04:14:40.247Z","repository":{"id":45746686,"uuid":"514357617","full_name":"brson/wasm-opt-rs","owner":"brson","description":"Rust bindings for Binaryen's wasm-opt","archived":false,"fork":false,"pushed_at":"2024-03-31T11:55:41.000Z","size":1075,"stargazers_count":69,"open_issues_count":27,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-01T23:14:23.743Z","etag":null,"topics":["rust","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"WebAssembly","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/brson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-15T17:49:39.000Z","updated_at":"2025-03-27T15:59:46.000Z","dependencies_parsed_at":"2023-01-31T20:15:34.943Z","dependency_job_id":"665ce5f3-146a-4d89-a35f-749620ea5b40","html_url":"https://github.com/brson/wasm-opt-rs","commit_stats":{"total_commits":413,"total_committers":5,"mean_commits":82.6,"dds":0.4285714285714286,"last_synced_commit":"66b161e294bb332947f8319993ae1f8d3498e1e8"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fwasm-opt-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fwasm-opt-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fwasm-opt-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brson%2Fwasm-opt-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brson","download_url":"https://codeload.github.com/brson/wasm-opt-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246724822,"owners_count":20823544,"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":["rust","wasm","webassembly"],"created_at":"2024-10-10T07:37:34.394Z","updated_at":"2025-04-05T04:14:40.196Z","avatar_url":"https://github.com/brson.png","language":"WebAssembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust bindings for Binaryen's `wasm-opt`\n\n[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/github-brson/wasm--opt--rs-8da0cb?style=for-the-badge\u0026labelColor=555555\u0026logo=github\" height=\"20\"\u003e](https://github.com/brson/wasm-opt-rs)\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/wasm-opt.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/wasm-opt)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-wasm--opt-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/wasm-opt)\n[\u003cimg alt=\"build status\" src=\"https://img.shields.io/github/actions/workflow/status/brson/wasm-opt-rs/ci.yml?branch=master\u0026style=for-the-badge\" height=\"20\"\u003e](https://github.com/brson/wasm-opt-rs/actions?query=branch%3Amaster)\n\n`wasm-opt` is a component of the [Binaryen] toolkit\nthat optimizes [WebAssembly] modules. It is written\nin C++.\n\n[Binaryen]: https://github.com/WebAssembly/binaryen\n[WebAssembly]: https://webassembly.org/\n\nThis project provides a Rust crate that builds `wasm-opt` and:\n\n1) makes its command-line interface installable via `cargo install`,\n2) provides an API to access it programmatically.\n\n\n\n\n## Installing the binary\n\n```\ncargo install wasm-opt --locked\n```\n\nIt should behave exactly the same as `wasm-opt` installed from other sources.\n\n\n\n\n## Using the library\n\nSee the [API documentation][api].\n\n[api]: https://docs.rs/wasm-opt\n\n\n\n\n## Building from source\n\n```\ngit clone https://github.com/brson/wasm-opt-rs\ncd wasm-opt-rs\ngit submodule update --init --recursive\ncargo build \u0026\u0026 cargo test\n```\n\n\n\n\n## Toolchain requirements\n\nRequires Rust 1.48+ and a C++ compiler with C++17 support.\nIt does not require CMake or other C++ build tools.\n\nThese are the earliest C++ compiler versions known to work:\n\n- gcc 7\n- clang 7\n- Visual Studio 2019\n\n\n\n\n## Limitations\n\n- The `wasm-opt-sys` crate takes a non-negligible amount of time to build. It\n  also does not do any incremental recompilation, so if the build is invalidated\n  it will rebuild the C++ code from scratch. The lack of incremental\n  recompilation is a limitation self-imposed by not using cmake or other\n  external build system.\n- `wasm-opt` on Windows does not support extended unicode paths (probably\n  anything non-ASCII). This is a [limitation of\n  binaryen](https://github.com/brson/wasm-opt-rs/issues/40) and not a regression\n  of the bindings. It may or may not be fixed in the future. The APIs will\n  return an error if this occurs.\n- `cargo tarpaulin` (code coverage) [segfaults running any `wasm-opt`\n  crates](https://github.com/brson/wasm-opt-rs/issues/59), reason unknown. This\n  behavior could infect other crates that link to `wasm-opt`. If you use\n  tarpaulin, you might verify it continues to work.\n\n\n\n\n## Versioning\n\nBinaryen uses a single monotonically-increasing number for versions.\nThis crate uses the semver minor version to track the Binaryen version,\nso e.g. the `wasm-opt` crate version `0.110.0` corresponds to Binaryen 110.\nPoint releases are used for bugfixes.\n\nSince minor version bumps of crates earlier than `1.0.0` are considered breaking,\nusers need to explicitly upgrade versions of `wasm-opt` to get new Binaryen releases,\nand upgrades may have breaking API changes,\nthough we don't anticipate significant changes.\n\n\n\n\n## Thanks\n\nThis project was created thanks to a [grant from the Web3 Foundation](https://github.com/w3f/Grants-Program/pull/1070).\n\n\n\n\n## License\n\nLicensed under either of [Apache License, Version 2.0](LICENSE-APACHE)\nor [MIT license](LICENSE-MIT) at your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this project by you, as defined in the Apache-2.0 license,\nshall be dual licensed as above, without any additional terms or conditions.\n\nBinaryen itself, code from which is compiled and linked by this project,\nis licensed under the terms of the Apache License, Version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrson%2Fwasm-opt-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrson%2Fwasm-opt-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrson%2Fwasm-opt-rs/lists"}