{"id":18928892,"url":"https://github.com/loopystudios/web_panic_report","last_synced_at":"2025-04-15T14:31:46.498Z","repository":{"id":228087822,"uuid":"773117459","full_name":"loopystudios/web_panic_report","owner":"loopystudios","description":"A panic handler for wasm32 bug reporting","archived":false,"fork":false,"pushed_at":"2024-08-15T12:05:15.000Z","size":102,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T11:15:56.256Z","etag":null,"topics":["rust","wasm"],"latest_commit_sha":null,"homepage":"https://loopystudios.github.io/web_panic_report/","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/loopystudios.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":"2024-03-16T19:49:14.000Z","updated_at":"2025-01-31T15:04:04.000Z","dependencies_parsed_at":"2024-03-22T02:24:34.101Z","dependency_job_id":"32c850d3-e575-4942-b9f9-53dca1aa9c28","html_url":"https://github.com/loopystudios/web_panic_report","commit_stats":null,"previous_names":["vrixyz/web_panic_report","vectorgameexperts/web_panic_report","loopystudios/web_panic_report"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopystudios%2Fweb_panic_report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopystudios%2Fweb_panic_report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopystudios%2Fweb_panic_report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopystudios%2Fweb_panic_report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopystudios","download_url":"https://codeload.github.com/loopystudios/web_panic_report/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249088819,"owners_count":21210869,"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"],"created_at":"2024-11-08T11:28:34.406Z","updated_at":"2025-04-15T14:31:46.180Z","avatar_url":"https://github.com/loopystudios.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Web Panic Report\n\n**A panic hook which replaces an HTML element with a bug report form.**\n\n[![Discord](https://img.shields.io/discord/913957940560531456.svg?label=Loopy\u0026logo=discord\u0026logoColor=ffffff\u0026color=ffffff\u0026labelColor=000000)](https://discord.gg/zrjnQzdjCB)\n[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](#license)\n[![Build status](https://github.com/loopystudios/web_panic_report/workflows/CI/badge.svg)](https://github.com/loopystudios/web_panic_report/actions)\n[![dependency status](https://deps.rs/repo/github/loopystudios/web_panic_report/status.svg)](https://deps.rs/repo/github/loopystudios/web_panic_report)\n[![Crates.io](https://img.shields.io/crates/v/web_panic_report.svg)](https://crates.io/crates/web_panic_report)\n[![Docs](https://img.shields.io/docsrs/web_panic_report)](https://docs.rs/web_panic_report)\n\n\u003c/div\u003e\n\n\u003e [!WARNING]\n\u003e The goal of this project is NOT to provide a full-fledge error reporting and analytics, only to help provide a framework to report panic conditions.\n\nQuickstart to run demo:\n\n```shell\n# Make sure the Rust toolchain supports the wasm32 target\nrustup target add wasm32-unknown-unknown\n\n# Install `wasm-server-runner` for the example\ncargo install wasm-server-runner\n\nWASM_SERVER_RUNNER_CUSTOM_INDEX_HTML=examples/index.html cargo run --target wasm32-unknown-unknown --example simple\n```\n\nThere is also a web demo [available here](https://loopystudios.github.io/web_panic_report).\n\n![Demo](image.png)\n\n## Usage\n\n\u003e [!IMPORTANT]\n\u003e On release mode, debug symbols are stripped. You will need to enable them manually if you want useful stack traces for production builds.\n\u003e\n\u003e Add the following to your `Cargo.toml`\n\u003e\n\u003e ```toml\n\u003e [profile.release]\n\u003e debug = true\n\u003e ```\n\nEnsure your web page is served with a container element that will be replaced with the bug report form.\n\n```html\n\u003cbody\u003e\n  \u003cdiv id=\"my-container\" style=\"width: 400px; height: 400px;\"\u003e\n    /** Content that is replaced here on panic, like a game canvas */\n  \u003c/div\u003e\n\u003c/body\u003e\n```\n\nThen, set the panic hook at the beginning of your program on web.\n\n```rust\nfn main() {\n    #[cfg(target_arch = \"wasm32\")]\n    web_panic_report::set_default_hook_with(\"my-container\", |panic_info| {\n        // Send the panic info to your backend here.\n        // This is triggered when the user clicks \"Send Report\"\n    });\n}\n```\n\nYou can also use a custom bug report form. See the [custom example](examples/custom.rs).\n\n## Alternatives\n\n- [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook) - Only outputs stack trace to the console.\n\n## Minimum supported Rust Version (MSRV)\n\nThis version of Web Panic Report has been verified to compile with **Rust 1.75** and later.\n\nFuture versions of Web Panic Report might increase the Rust version requirement.\nIt will not be treated as a breaking change and as such can even happen with small patch releases.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here if compiling fails.\u003c/summary\u003e\n\nAs time has passed, some of Web Panic Report's dependencies could have released versions with a higher Rust requirement.\nIf you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.\n\n```sh\n# Use the problematic dependency's name and version\ncargo update -p package_name --precise 0.1.1\n```\n\n\u003c/details\u003e\n\n## Community\n\nAll Loopy projects and development happens in the [Loopy Discord](https://discord.gg/zrjnQzdjCB). The discord is open to the public.\n\nContributions are welcome by pull request. The [Rust code of conduct](https://www.rust-lang.org/policies/code-of-conduct) applies.\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopystudios%2Fweb_panic_report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopystudios%2Fweb_panic_report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopystudios%2Fweb_panic_report/lists"}