{"id":13472682,"url":"https://github.com/bytecodealliance/cargo-wasi","last_synced_at":"2025-03-26T17:31:07.808Z","repository":{"id":35240888,"uuid":"216921559","full_name":"bytecodealliance/cargo-wasi","owner":"bytecodealliance","description":"A lightweight Cargo subcommand to build Rust code for the `wasm32-wasi` target","archived":false,"fork":false,"pushed_at":"2023-10-27T03:23:17.000Z","size":804,"stargazers_count":441,"open_issues_count":27,"forks_count":29,"subscribers_count":28,"default_branch":"main","last_synced_at":"2024-07-09T22:16:15.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bytecodealliance.github.io/cargo-wasi/","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","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-22T22:34:47.000Z","updated_at":"2024-05-28T15:48:37.000Z","dependencies_parsed_at":"2024-01-07T21:04:54.337Z","dependency_job_id":"161454bc-59c9-4985-bc82-e0226814da2f","html_url":"https://github.com/bytecodealliance/cargo-wasi","commit_stats":{"total_commits":241,"total_committers":13,"mean_commits":18.53846153846154,"dds":"0.24896265560165975","last_synced_commit":"c3d544a11edd3e09b668026984af5a0551644d2f"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fcargo-wasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fcargo-wasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fcargo-wasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytecodealliance%2Fcargo-wasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytecodealliance","download_url":"https://codeload.github.com/bytecodealliance/cargo-wasi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213381560,"owners_count":15578569,"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-07-31T16:00:57.035Z","updated_at":"2025-03-26T17:31:07.803Z","avatar_url":"https://github.com/bytecodealliance.png","language":"Rust","readme":"# `cargo wasi` is deprecated, use [`cargo component`] instead\n\nThis repository for the `cargo wasi` tool was created long before the Component\nModel of today in a time where the future of WASI was much less certain than it\nis now. Nowadays users looking to integrate Rust and WASI should use [`cargo\ncomponent`] instead of `cargo wasi.\n\nThe original assumptions of `cargo wasi`, such as being based on `wasm-bindgen`,\nare no longer applicable and the design direction of WASI has changed\nsignificantly relative to when this tool was started.\n\nSee [this\ncomment](https://github.com/bytecodealliance/cargo-wasi/issues/143#issue-1839621636)\nfor a few more details. Otherwise feel free to reach out on [Zulip] with any\nquestions.\n\n[`cargo component`]: https://github.com/bytecodealliance/cargo-component\n[Zulip]: https://bytecodealliance.zulipchat.com/\n\n---------\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\u003ccode\u003ecargo wasi\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\u003eA lightweight Cargo subcommand to build code for the \u003ccode\u003ewasm32-wasi\u003c/code\u003e target.\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://crates.io/crates/cargo-wasi\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/cargo-wasi.svg?style=flat-square\" alt=\"Crates.io version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/cargo-wasi\"\u003e\u003cimg src=\"https://img.shields.io/crates/d/cargo-wasi.svg?style=flat-square\" alt=\"Download\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://bytecodealliance.github.io/cargo-wasi/\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\" alt=\"docs.rs docs\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003ch3\u003e\n    \u003ca href=\"https://bytecodealliance.github.io/cargo-wasi/\"\u003eGuide\u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://bytecodealliance.github.io/cargo-wasi/contributing.html\"\u003eContributing\u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n## Installation\n\nTo install this Cargo subcommand, first you'll want to [install\nRust](https://www.rust-lang.org/tools/install) and then you'll execute:\n\n```\n$ cargo install cargo-wasi\n```\n\nAfter that you can verify it works via:\n\n```\n$ cargo wasi --version\n```\n\n[**Read more about installation in the\nguide!**](https://bytecodealliance.github.io/cargo-wasi/install.html)\n\n## Usage\n\nThe `cargo wasi` subcommand is a thin wrapper around `cargo` subcommands,\nproviding optimized defaults for the `wasm32-wasi` target. Using `cargo wasi`\nlooks very similar to using `cargo`:\n\n* `cargo wasi build` — build your code in debug mode for the wasi target.\n\n* `cargo wasi build --release` — build the optimized version of your `*.wasm`.\n\n* `cargo wasi run` — execute a binary.\n\n* `cargo wasi test` — run your tests in `wasm32-wasi`.\n\n* `cargo wasi bench` — run your benchmarks in `wasm32-wasi`.\n\nIn general, if you'd otherwise execute `cargo foo --flag` you can likely execute\n`cargo wasi foo --flag` and everything will \"just work\" for the `wasm32-wasi`\ntarget.\n\nTo give it a spin yourself, try out the hello-world versions of programs!\n\n```\n$ cargo new wasi-hello-world\n     Created binary (application) `wasi-hello-world` package\n$ cd wasi-hello-world\n$ cargo wasi run\n   Compiling wasi-hello-world v0.1.0 (/code/wasi-hello-world)\n    Finished dev [unoptimized + debuginfo] target(s) in 0.15s\n     Running `cargo-wasi target/wasm32-wasi/debug/wasi-hello-world.wasm`\n     Running `target/wasm32-wasi/debug/wasi-hello-world.wasm`\nHello, world!\n```\n\nOr a library with some tests:\n\n```\n$ cargo new wasi-hello-world --lib\n     Created library `wasi-hello-world` package\n$ cd wasi-hello-world\n$ cargo wasi test\n   Compiling wasi-hello-world v0.1.0 (/code/wasi-hello-world)\n    Finished dev [unoptimized + debuginfo] target(s) in 0.19s\n     Running target/wasm32-wasi/debug/deps/wasi_hello_world-9aa88657c21196a1.wasm\n     Running `/code/wasi-hello-world/target/wasm32-wasi/debug/deps/wasi_hello_world-9aa88657c21196a1.wasm`\n\nrunning 1 test\ntest tests::it_works ... ok\n\ntest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out\n```\n\n[**Read more about `cargo wasi` usage in the\nguide!**](https://bytecodealliance.github.io/cargo-wasi/cli-usage.html)\n\n## License\n\nThis project is license under the Apache 2.0 license with the LLVM exception.\nSee [LICENSE] for more details.\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.0 license,\nshall be licensed as above, without any additional terms or conditions.\n\n[**See the contributing section of the guide to start hacking on `cargo\nwasi`!**](https://bytecodealliance.github.io/cargo-wasi/contributing.html)\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fcargo-wasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytecodealliance%2Fcargo-wasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytecodealliance%2Fcargo-wasi/lists"}