{"id":49365761,"url":"https://github.com/git-pkgs/platforms","last_synced_at":"2026-04-27T19:04:35.449Z","repository":{"id":349309917,"uuid":"1158090286","full_name":"git-pkgs/platforms","owner":"git-pkgs","description":"Translate platform identifier strings across package ecosystems.","archived":false,"fork":false,"pushed_at":"2026-04-20T11:12:23.000Z","size":50,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-20T13:27:56.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/git-pkgs.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-14T19:28:24.000Z","updated_at":"2026-04-20T11:12:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/git-pkgs/platforms","commit_stats":null,"previous_names":["git-pkgs/platforms"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/git-pkgs/platforms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-pkgs%2Fplatforms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-pkgs%2Fplatforms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-pkgs%2Fplatforms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-pkgs%2Fplatforms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-pkgs","download_url":"https://codeload.github.com/git-pkgs/platforms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-pkgs%2Fplatforms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32350270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-04-27T19:04:32.124Z","updated_at":"2026-04-27T19:04:35.443Z","avatar_url":"https://github.com/git-pkgs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# platforms\n\nTranslate platform identifier strings across package ecosystems.\n\nAn ARM64 Mac is `darwin/arm64` to Go, `darwin-arm64` to Node, `aarch64-apple-darwin` to Rust, `arm64-darwin` to RubyGems, and `macosx_11_0_arm64` to Python. This module provides a shared mapping between all of them.\n\n```go\nimport \"github.com/git-pkgs/platforms\"\n\n// Parse an ecosystem-specific string into a canonical Platform\np, _ := platforms.Parse(platforms.Go, \"darwin/arm64\")\n// p.Arch == \"aarch64\", p.OS == \"darwin\"\n\n// Format a Platform for a different ecosystem\ns, _ := platforms.Format(platforms.Rust, p)\n// s == \"aarch64-apple-darwin\"\n\n// Or translate directly\ns, _ = platforms.Translate(platforms.Go, platforms.RubyGems, \"darwin/arm64\")\n// s == \"arm64-darwin\"\n\n// Normalize to the preferred form\ns, _ = platforms.Normalize(platforms.Python, \"linux_x86_64\")\n// s == \"manylinux_2_17_x86_64\"\n```\n\n## Supported ecosystems\n\n| Ecosystem | Example | Format |\n|---|---|---|\n| `go` | `linux/amd64` | `os/arch` |\n| `node` | `darwin-arm64` | `os-arch` |\n| `rust` | `x86_64-unknown-linux-gnu` | `arch-vendor-os-abi` |\n| `rubygems` | `arm64-darwin` | `arch-os` |\n| `python` | `manylinux_2_17_x86_64` | `tag_version_arch` |\n| `debian` | `x86_64-linux-gnu` | `arch-os-abi` |\n| `llvm` | `aarch64-apple-darwin` | `arch-vendor-os` |\n| `nuget` | `linux-x64` | `os-arch` |\n| `vcpkg` | `x64-linux` | `arch-os` |\n| `conan` | `Linux/armv8` | `os/arch` (settings) |\n| `homebrew` | `arm64_sonoma` | `arch_codename` |\n| `swift` | `aarch64-apple-darwin` | LLVM triples |\n| `kotlin` | `linuxX64` | `osArch` (camelCase) |\n| `maven` | `linux-aarch_64` | `os-arch` |\n\n## How it works\n\nThe mapping data lives in JSON files under `data/`. `arches.json` and `oses.json` map canonical names to per-ecosystem aliases. [`platforms.json`](data/platforms.json) has pre-computed full strings for common platforms that can't be composed mechanically (like RubyGems using `arm64` on macOS but `aarch64` on Linux).\n\nParsing tries the pre-computed index first, then falls back to decomposing the string using ecosystem-specific rules and resolving components through the alias tables.\n\nSee [SPEC.md](SPEC.md) for the full specification.\n\n## Related\n\n[archspec](https://github.com/archspec/archspec) ([Go port](https://github.com/archspec/archspec-go)) models CPU microarchitectures as a compatibility DAG -- it knows that zen3 descends from zen2 and which instruction sets each supports. This module works one level up, mapping the coarse arch/OS/ABI strings that package managers use. The two are complementary: archspec's `Family()` returns architecture family names (`x86_64`, `aarch64`) that match the canonical arch names used here.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-pkgs%2Fplatforms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-pkgs%2Fplatforms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-pkgs%2Fplatforms/lists"}