{"id":15296124,"url":"https://github.com/lesomnus/vcpkg-cache-http","last_synced_at":"2025-07-08T18:32:12.459Z","repository":{"id":180750041,"uuid":"665218592","full_name":"lesomnus/vcpkg-cache-http","owner":"lesomnus","description":"HTTP provider for vcpkg binary caching","archived":false,"fork":false,"pushed_at":"2023-12-25T11:26:19.000Z","size":68,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T05:30:36.157Z","etag":null,"topics":["c","cache","cplusplus","cpp","vcpkg","vcpkg-binary-caching"],"latest_commit_sha":null,"homepage":"","language":"Go","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/lesomnus.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":"2023-07-11T17:50:40.000Z","updated_at":"2024-08-15T10:34:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"82038c5f-1433-4d9b-a032-89e586c2df53","html_url":"https://github.com/lesomnus/vcpkg-cache-http","commit_stats":null,"previous_names":["lesomnus/vcpkg-cache-http"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lesomnus/vcpkg-cache-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesomnus%2Fvcpkg-cache-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesomnus%2Fvcpkg-cache-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesomnus%2Fvcpkg-cache-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesomnus%2Fvcpkg-cache-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lesomnus","download_url":"https://codeload.github.com/lesomnus/vcpkg-cache-http/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lesomnus%2Fvcpkg-cache-http/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264323983,"owners_count":23590780,"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":["c","cache","cplusplus","cpp","vcpkg","vcpkg-binary-caching"],"created_at":"2024-09-30T18:09:28.543Z","updated_at":"2025-07-08T18:32:12.437Z","avatar_url":"https://github.com/lesomnus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vcpkg-cache-http\n[![build](https://github.com/lesomnus/vcpkg-cache-http/actions/workflows/build.yaml/badge.svg)](https://github.com/lesomnus/vcpkg-cache-http/actions/workflows/build.yaml)\n[![test](https://github.com/lesomnus/vcpkg-cache-http/actions/workflows/test.yaml/badge.svg)](https://github.com/lesomnus/vcpkg-cache-http/actions/workflows/test.yaml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8535edf4b4af4238a2140994efe99d55)](https://app.codacy.com/gh/lesomnus/vcpkg-cache-http/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/8535edf4b4af4238a2140994efe99d55)](https://app.codacy.com/gh/lesomnus/vcpkg-cache-http/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_coverage)\n\nHTTP provider for [*vcpkg*](https://github.com/microsoft/vcpkg) binary caching.\n```sh\n$ vcpkg-cache-http\n2023-07-12T17:37:14Z INF use default store store=file:vcpkg-cache\n2023-07-12T17:37:14Z INF start server addr=0.0.0.0:15151\n2023-07-12T17:39:04Z INF _=nAq80yfCqKVl method=GET url=/zlib/1.2.13/70a5ceda64f1b5c01c1f7afe7669a32bc11c11496d8aeb094d7389a43c946f4b\n2023-07-12T17:39:04Z INF REQ GET _=nAq80yfCqKVl hash=70a5ceda64f1b5c01c1f7afe7669a32bc11c11496d8aeb094d7389a43c946f4b name=zlib version=1.2.13\n2023-07-12T17:39:04Z WRN RES GET _=nAq80yfCqKVl dt=0.098659 status=404\n2023-07-12T17:39:05Z INF _=6jFojxVafWyU method=PUT url=/zlib/1.2.13/70a5ceda64f1b5c01c1f7afe7669a32bc11c11496d8aeb094d7389a43c946f4b\n2023-07-12T17:39:05Z INF REQ PUT _=6jFojxVafWyU hash=70a5ceda64f1b5c01c1f7afe7669a32bc11c11496d8aeb094d7389a43c946f4b name=zlib version=1.2.13\n2023-07-12T17:39:05Z INF RES PUT _=6jFojxVafWyU dt=0.839125 status=200\n2023-07-12T17:41:12Z INF _=JAjAKcKtGmfl method=GET url=/zlib/1.2.13/70a5ceda64f1b5c01c1f7afe7669a32bc11c11496d8aeb094d7389a43c946f4b\n2023-07-12T17:41:12Z INF REQ GET _=JAjAKcKtGmfl hash=70a5ceda64f1b5c01c1f7afe7669a32bc11c11496d8aeb094d7389a43c946f4b name=zlib version=1.2.13\n2023-07-12T17:41:12Z INF RES GET _=JAjAKcKtGmfl dt=0.467711 status=200\n```\n\n## Usage\n\nJust start the server.\nBy default, it listens on port 15151 and creates a directory named `vcpkg-cache` to store the binary cache.\n\n```sh\n$ vcpkg-cache-http                                        \n2023-07-12T17:37:14Z INF use default store store=file:vcpkg-cache\n2023-07-12T17:37:14Z INF start server addr=0.0.0.0:15151\n```\n\nSet *vcpkg* binary source as `http,http://localhost:15151/{name}/{version}/{sha},readwrite`.\nIt can be set to environment variable `VCPKG_BINARY_SOURCES` or passed by *vcpkg* command with `--binarysource` flag.\nPlease see *vcpkg* official document about [Binary Caching](https://learn.microsoft.com/en-us/vcpkg/users/binarycaching) for details.\n\n```sh\n$ vcpkg install --binarysource=\"http,http://localhost:15151/{name}/{version}/{sha},readwrite\" zlib\nComputing installation plan...\nThe following packages will be built and installed:\n    zlib:x64-linux -\u003e 1.2.13\nDetecting compiler hash for triplet x64-linux...\nRestored 0 package(s) from /home/hypnos/.cache/vcpkg/archives in 7 us. Use --debug to see more details.\nRestored 1 package(s) from HTTP servers in 12.9 ms. Use --debug to see more details.\nInstalling 1/1 zlib:x64-linux...\nElapsed time to handle zlib:x64-linux: 769 us\nTotal install time: 774 us\n```\n\nNote that `zlib` is cached on the server; message indicating that `zlib` has been restored from the HTTP server.\n\n## Install\n\n### From Source\n```sh\ngo install github.com/lesomnus/vcpkg-cache-http@latest\n```\n\n### Docker\n```sh\ndocker pull ghcr.io/lesomnus/vcpkg-cache-http:edge \n```\n\nCurrently, only `edge` tag built from the `main` branch is provided.\n\n## Stores\n\n`vcpkg-cache-http` accepts 1 positional argument that indicates the location to store the binary cache. The store is formed as `kind[:[path][,opt[=val]]]`.\nFor example, store that stores the binary cache to a directory where `./path/to/store` is as follow:\n\n```\nfiles:./path/to/store\n```\n\nAvailable stores are:\n\n- `files:[vcpkg-cache]`\n  \n    Stores to a directory at the given path.\n\n- `archives:[${HOME}/.cache/vcpkg/archives]`\n\n    Use *vcpkg*'s `files` provider at the given path as a store.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesomnus%2Fvcpkg-cache-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flesomnus%2Fvcpkg-cache-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flesomnus%2Fvcpkg-cache-http/lists"}