{"id":15662901,"url":"https://github.com/peter-evans/rust-wasm-action","last_synced_at":"2025-08-17T10:06:01.868Z","repository":{"id":43897965,"uuid":"286394906","full_name":"peter-evans/rust-wasm-action","owner":"peter-evans","description":"Rust-generated WebAssembly GitHub action template","archived":false,"fork":false,"pushed_at":"2025-03-24T02:35:00.000Z","size":152,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-08T11:16:05.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peter-evans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null},"funding":{"github":"peter-evans"}},"created_at":"2020-08-10T06:31:06.000Z","updated_at":"2025-06-02T05:54:01.000Z","dependencies_parsed_at":"2024-03-25T04:22:05.956Z","dependency_job_id":"20d683ed-5cd8-473a-b2ed-b351152bcd41","html_url":"https://github.com/peter-evans/rust-wasm-action","commit_stats":{"total_commits":88,"total_committers":5,"mean_commits":17.6,"dds":0.4545454545454546,"last_synced_commit":"b8d65b9449d21ba9285a1e69e4c284352d5b9db0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peter-evans/rust-wasm-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frust-wasm-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frust-wasm-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frust-wasm-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frust-wasm-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-evans","download_url":"https://codeload.github.com/peter-evans/rust-wasm-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Frust-wasm-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270832140,"owners_count":24653486,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-03T13:34:52.630Z","updated_at":"2025-08-17T10:06:01.779Z","avatar_url":"https://github.com/peter-evans.png","language":"Rust","funding_links":["https://github.com/sponsors/peter-evans"],"categories":[],"sub_categories":[],"readme":"# Rust-generated WebAssembly GitHub action template\n[![CI](https://github.com/peter-evans/rust-wasm-action/workflows/CI/badge.svg)](https://github.com/peter-evans/rust-wasm-action/actions?query=workflow%3ACI)\n\nA template to bootstrap the creation of a Rust-generated WebAssembly GitHub action.\n\n## About\n\nThis project is experimental. While it is very much feasible to write a GitHub action in Rust-generated WebAssembly, as this project demonstrates, there are some challenges compared to JavaScript/TypeScript.\n\nThe following is a summary of pain points I discovered, and some caveats when using the template.\n\n- It relies on raw bindings to the official [actions toolkit](https://github.com/actions/toolkit) NPM packages. Bindings for this template are defined in [actions-toolkit-bindings](actions-toolkit-bindings) but they are incomplete. I've only defined bindings that are in use by the template. It would be great to have a well maintained set of bindings published as a crate.\n\n- WebAssembly runs in a safe, sandboxed execution environment. As a result there is no access to files on disks, environment variables, etc. This means bindings to JavaScript functions are necessary for some functionality.\n\n- Panics cause the action to fail on exit but could be handled a little better. Perhaps we need a hook similar to the [console_error_panic_hook](https://github.com/rustwasm/console_error_panic_hook) that calls the binding for the [`setFailed`](https://github.com/actions/toolkit/blob/main/packages/core/src/core.ts#L103-L112) function in `@actions/core`.\n\n- When dealing with string input you need to make decisions about whether to leave the string in JavaScript encoded as UTF-16 (`js_sys::JsString`), or to copy the string into Rust encoded as UTF-8. The later is lossy and in some cases could cause the string to be different in Rust than JavaScript. See the wasm-bindgen documentation [here](https://rustwasm.github.io/wasm-bindgen/reference/types/str.html#utf-16-vs-utf-8) for further detail.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Frust-wasm-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-evans%2Frust-wasm-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Frust-wasm-action/lists"}