{"id":27279109,"url":"https://github.com/spacenation/swift-equatable","last_synced_at":"2025-10-11T15:40:00.235Z","repository":{"id":241598457,"uuid":"807196388","full_name":"spacenation/swift-equatable","owner":"spacenation","description":":rocket: Swift Macro for synthesizing Equatable conformance for classes and actors","archived":false,"fork":false,"pushed_at":"2024-05-29T06:15:20.000Z","size":11,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T14:02:23.062Z","etag":null,"topics":["ios","macos","swift","swift-macro","swift-package"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/spacenation.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}},"created_at":"2024-05-28T16:33:15.000Z","updated_at":"2025-07-10T15:25:09.000Z","dependencies_parsed_at":"2024-05-29T07:57:13.345Z","dependency_job_id":null,"html_url":"https://github.com/spacenation/swift-equatable","commit_stats":null,"previous_names":["spacenation/swift-equatable"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/spacenation/swift-equatable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswift-equatable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswift-equatable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswift-equatable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswift-equatable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacenation","download_url":"https://codeload.github.com/spacenation/swift-equatable/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacenation%2Fswift-equatable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007602,"owners_count":26084334,"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-11T02:00:06.511Z","response_time":55,"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":["ios","macos","swift","swift-macro","swift-package"],"created_at":"2025-04-11T17:47:47.906Z","updated_at":"2025-10-11T15:40:00.206Z","avatar_url":"https://github.com/spacenation.png","language":"Swift","funding_links":["https://github.com/sponsors/spacenation"],"categories":[],"sub_categories":[],"readme":"# Swift Equatable Macro\n![Swift Version](https://img.shields.io/badge/Swift-5.10-DE5D43)\n[![License](https://img.shields.io/badge/License-MIT-blue)](LICENSE)\n\nThis package automatically generates `Equatable` conformance for both classes and actors. This means that you do not need to manually implement the `==` operator for your classes and actors, as this package will handle it for you.\n\nBy conforming to `Equatable`, instances of your classes and actors can be easily compared for equality, which is useful for many operations such as sorting, searching, and maintaining collections. This package ensures that the generated `==` operator correctly compares all relevant properties of your classes and actors, providing a robust and efficient implementation.\n\n**Note**: Classes must be marked as final to use this package. This ensures that the synthesized `==` operator is accurate and efficient, as it does not need to account for potential subclassing.\n\n## Usage\n\nAdd `@Equatable` annotation to class or actor \n\n```swift\nimport Equatable\n\n@Equatable\npublic final class Planet {\n    let name: String\n    let mass: Mass\n}\n\n/// Expands to\nextension Planet: Equatable {\n    public static func == (lhs: Planet, rhs: Planet) -\u003e Bool {\n        lhs.name == rhs.name \u0026\u0026\n        lhs.mass == rhs.mass\n    }\n}\n```\n\n## Installation\n\nTo use the `Equatable` library in a SwiftPM project, \nadd it to the dependencies for your package and your target:\n\n```swift\nlet package = Package(\n    // name, platforms, products, etc.\n    dependencies: [\n        // other dependencies\n        .package(url: \"https://github.com/spacenation/swift-equatable\", from: \"1.0.0\"),\n    ],\n    targets: [\n        .target(\n            // name, etc.\n            dependencies: [\n                // other dependencies\n                .product(name: \"Equatable\", package: \"swift-equatable\")\n            ]\n        )\n        // other targets\n    ]\n)\n```\n\n## Contributions\n\nFeel free to contribute via fork/pull request to the main branch. If you want to request a feature or report a bug, please start a new issue.\n\n## Become a Sponsor\n\nIf you find this project useful, please consider becoming our [GitHub Sponsor](https://github.com/sponsors/spacenation).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacenation%2Fswift-equatable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacenation%2Fswift-equatable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacenation%2Fswift-equatable/lists"}