{"id":26976837,"url":"https://github.com/godsarmy/libversion-zig","last_synced_at":"2026-01-29T02:26:30.410Z","repository":{"id":285685847,"uuid":"958988201","full_name":"godsarmy/libversion-zig","owner":"godsarmy","description":"libversion-zig is a small wrapper around libversion C API, making it easier to use with Zig.","archived":false,"fork":false,"pushed_at":"2025-04-12T13:45:41.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T14:41:20.447Z","etag":null,"topics":["libversion","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/godsarmy.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":"2025-04-02T04:57:02.000Z","updated_at":"2025-04-12T13:35:23.000Z","dependencies_parsed_at":"2025-04-02T06:22:07.359Z","dependency_job_id":"967c80c2-4a18-4c6b-8ba3-a39efee477ee","html_url":"https://github.com/godsarmy/libversion-zig","commit_stats":null,"previous_names":["godsarmy/libversion-zig"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/godsarmy/libversion-zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godsarmy%2Flibversion-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godsarmy%2Flibversion-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godsarmy%2Flibversion-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godsarmy%2Flibversion-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godsarmy","download_url":"https://codeload.github.com/godsarmy/libversion-zig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godsarmy%2Flibversion-zig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261212483,"owners_count":23125583,"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":["libversion","zig"],"created_at":"2025-04-03T12:17:08.578Z","updated_at":"2026-01-29T02:26:30.406Z","avatar_url":"https://github.com/godsarmy.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libversion-zig\n\nThis package is a thin wrapper around [libversion](https://github.com/repology/libversion)'s C API.\nIts release version is in synchronization with [libversion release](https://github.com/repology/libversion/releases).\n\n# Installation\n\n```sh\nzig fetch --save git+https://github.com/godsarmy/libversion-zig\n```\nNow in your build.zig you can access the module like this:\n\n```zig\nconst libversion = b.dependency(\"libversion\", .{\n    .target = target,\n    .optimize = optimize,\n});\nexe.root_module.addImport(\"libversion\", libversion.module(\"libversion\"));\n```\n\n# Usage\n\n - Import `libversion-zig` like this:\n    ```zig\n    const libversion = @import(\"libversion\");\n    ```\n - Call Functions in `libversion-zig`\n    ```zig\n    // execute versionCompare2\n    _ = libversion.versionCompare2(\"1.0\", \"1.1\");  // return -1\n    _ = libversion.versionCompare2(\"2.0\", \"1.9\");  // return 1\n    _ = libversion.versionCompare2(\"2.0\", \"2.0\");  // return 0\n\n    // execute versionCompare4\n    _ = libversion.versionCompare4(\n        \"1.0p1\",\n        \"1.0pre1\",\n        libversion.flag.VERSIONFLAG_P_IS_PATCH,\n        libversion.flag.VERSIONFLAG_P_IS_PATCH,\n    );  // return 1\n    _ = libverison.versionCompare4(\n        \"1.0p1\",\n        \"1.0patch1\",\n        libversion.flag.VERSIONFLAG_P_IS_PATCH,\n        libversion.flag.VERSIONFLAG_P_IS_PATCH,\n    );  // return 0\n    _ = libversion.versionCompare4(\n        \"1.0p1\",\n        \"1.0post1\",\n        libversion.flag.VERSIONFLAG_P_IS_PATCH,\n        libversion.flag.VERSIONFLAG_P_IS_PATCH,\n    );  // return 0\n    ```\n\n# Zig Release support\n\n`libversion-zig` keeps track the specification of latest [stable version of Zig](https://ziglang.org/download/).\nCurrently, it can only be built by [Zig 0.15](https://ziglang.org/download/0.15.1/release-notes.html).\nThe plan is to support releases once Zig 1.0 is released but this can still change.\n\n# Development \u0026 Build\n\n - Install [Zig 0.15.2](https://ziglang.org/download/#release-0.15.2).\n - Clone project by git.\n - In project workspace, run build/test by `zig` command.\n    ```sh\n    zig build test\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodsarmy%2Flibversion-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodsarmy%2Flibversion-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodsarmy%2Flibversion-zig/lists"}