{"id":28399115,"url":"https://github.com/Lozlof/better-assert","last_synced_at":"2026-03-11T17:01:47.876Z","repository":{"id":294500847,"uuid":"986976789","full_name":"Gistyr/better-assert","owner":"Gistyr","description":"Rust assertion functions and panic with built-in logging","archived":false,"fork":false,"pushed_at":"2025-05-20T22:07:07.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T08:19:32.877Z","etag":null,"topics":["assert","assert-eq","assert-ne","debug","debug-assert","file-logging","logging","network-logging","panic","testing"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/better-assert","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/Gistyr.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-05-20T11:52:19.000Z","updated_at":"2025-07-02T15:50:10.000Z","dependencies_parsed_at":"2025-06-28T19:37:59.062Z","dependency_job_id":"633311b8-b38e-4345-b0aa-63ec0cc6153c","html_url":"https://github.com/Gistyr/better-assert","commit_stats":null,"previous_names":["gistyr/better-assert"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gistyr/better-assert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gistyr%2Fbetter-assert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gistyr%2Fbetter-assert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gistyr%2Fbetter-assert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gistyr%2Fbetter-assert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gistyr","download_url":"https://codeload.github.com/Gistyr/better-assert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gistyr%2Fbetter-assert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722728,"owners_count":26034461,"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-10-07T02:00:06.786Z","response_time":59,"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":["assert","assert-eq","assert-ne","debug","debug-assert","file-logging","logging","network-logging","panic","testing"],"created_at":"2025-06-01T07:10:15.856Z","updated_at":"2026-03-11T17:01:47.870Z","avatar_url":"https://github.com/Gistyr.png","language":"Rust","readme":"# better-assert\n#### Assertion helpers with built-in logging powered by [better-logger](https://crates.io/crates/better-logger)\n## ⚠️ Is this crate right for you?         \n\u003e #### Dependency note        \n\u003e **See [better-logger](https://crates.io/crates/better-logger) before you use this crate**   \n\u003e\n\u003e `better-assert` incorporates `better-logger` as its logging facade. Any project using `better-assert` must do the same.   \n\u003e `better-logger` has terminal, file, and network logging functionality.        \n### Why you might need it\n| Scenario | Pain point with plain `assert!` | How `better-assert` helps |\n|----------|---------------------------------|---------------------------|\n| **WASM front-end** | An `assert_eq!` fails silently in a user’s browser, you never see it | `log_assert_eq()` sends a log entry to your backend *before* the panic |\n| **Headless server / embedded** | A `panic!` crash disappears into `/dev/null` or an unknown serial console | `log_panic()` sends the details to a file, syslog, or over-the-wire sink |\n# HOW TO USE\n## 😺 ONE: Declare Feature\n```rust\n/* no default feature enabled (enabling both at once won't compile) */\nbetter-assert = { version = \"0.4.1\", features = [\"native\"] }\nbetter-assert = { version = \"0.4.1\", features = [\"wasm\"] }\n```\n## 🦮 TWO: Incorporate better-logger\n#### See the [better-logger docs](https://crates.io/crates/better-logger) for the quick-start\n```rust\n/* Also has no default feature enabled (enabling both at once won't compile) */\nbetter-logger = { version = \"0.4.1\", features = [\"native\"] }\nbetter-logger = { version = \"0.4.1\", features = [\"wasm\"] }\n```\n## 💻 THREE: Use\n```rust\nuse better_assert::*;\n\nlet left = \"value\".to_string();\nlet right = \"value\".to_string(); \n\nlog_assert_eq(\u0026left, \u0026right); // enabled in all builds\nlog_assert_ne(\u0026left, \u0026right);\n\ndebug_log_assert_eq(\u0026left, \u0026right); // enabled only in debug builds\ndebug_log_assert_ne(\u0026left, \u0026right);\n\nlog_panic(); // always logs, then panics\n```\n# License\n\u0026copy; 2026 Gistyr LLC               \nThis project, **better-assert**, is dual-licensed under your choice of:\n- **Apache License 2.0**  \n  See the [LICENSE-APACHE](LICENSE-APACHE) file or view it online at \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n- **MIT License**  \n  See the [LICENSE-MIT](LICENSE-MIT) file or view it online at \u003chttp://opensource.org/licenses/MIT\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLozlof%2Fbetter-assert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLozlof%2Fbetter-assert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLozlof%2Fbetter-assert/lists"}