Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Create references.md, features-*.md files #277

Merged
merged 3 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "docs"
paths:
- 'docs/**'
- '.github/workflows/gh-pages.yml'

permissions:
contents: read
Expand Down
96 changes: 96 additions & 0 deletions docs/feature-binarycaching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Binary Caching 기능 설명

* [What is binary caching?](https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-overview)

환경변수를 사용해 기능을 활성화 하는 방법

=== "PowerShell"
```ps1
$env:VCPKG_FEATURE_FLAGS="binarycaching"
```
=== "Bash"
```bash
export VCPKG_FEATURE_FLAGS="binarycaching"
```

## vcpkg-tool 소스코드

* https://github.com/microsoft/vcpkg-tool/blob/main/src/vcpkg/binarycaching.cpp

...

## ABI Hash 계산

* https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching#abi-hash

## `VCPKG_BINARY_SOURCES` 예시

* [Configuration Syntax](https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching#configuration-syntax)

문서 상으로는 `[,rw]` 라고 표기하고 있는데 실제로는 `readwrite`로 작성해야 동작...

여러 Source를 같이 사용하는 경우, `;`를 사용해 구분

```ps1
$env:VCPKG_AWS_SOURCE="..."
$env:VCPKG_AZURE_SOURCE="..."
$env:VCPKG_BINARY_SOURCES="defaukt;$env:VCPKG_AWS_SOURCE;$env:VCPKG_AZURE_SOURCE"
```

### File

```ps1
$DiskPath="D:/vcpkg-caches"
$env:VCPKG_BINARY_SOURCES="files,$DiskPath,readwrite"
```

### NuGet

* [`nuget.config` reference](https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file)
* [NuGet CLI reference](https://learn.microsoft.com/en-us/nuget/reference/nuget-exe-cli-reference)
* [Common NuGet configurations](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior)

NuGet config 파일이 필요할 수 있음

```ps1
# If the repository is private ...
$NugetConfigPath="D:/nuget-config.xml"
$env:VCPKG_BINARY_SOURCES="nuget,https://nexus.instance.com/repositories/nuget,readwrite;nugetconfig,$NugetConfigPath"
```

```xml
<configuration>
<!-- apikeys -->
<!-- packageSources -->
<!-- packageSourceCredentials -->
</configuration>
```

### AWS S3

* [AWS CLI Command Reference: S3](https://docs.aws.amazon.com/cli/latest/reference/s3/)

```ps1
$BucketName="..."

$env:VCPKG_BINARY_SOURCES="x-aws,s3://$BucketName/,readwrite"
```

```ps1
$BucketName="..."
$FolderName="vcpkg-caches"

$env:VCPKG_BINARY_SOURCES="x-aws,s3://$BucketName/$FolderName/,readwrite"
```

### Azure Blob Storage

* [Create SAS tokens for your storage containers](https://learn.microsoft.com/en-us/azure/ai-services/translator/document-translation/how-to-guides/create-sas-tokens)

```ps1
$BlobStorageName="..."
$BlobStorageFolder="vcpkg-caches"
$BlobStorageSAS="sv=...&se=...&st=...&sig=..."

$env:VCPKG_BINARY_SOURCES="x-azblob,https://$BlobStorageName.blob.core.windows.net/$BlobStorageFolder,$BlobStorageSAS,readwrite"
```
15 changes: 15 additions & 0 deletions docs/feature-manifest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Manifest 기능 설명

* [What is manifest mode?](https://learn.microsoft.com/en-us/vcpkg/concepts/manifest-mode)
* [vcpkg-configuration.json Reference](https://learn.microsoft.com/en-us/vcpkg/reference/vcpkg-configuration-json)

환경변수를 사용해 기능을 활성화 하는 방법

=== "PowerShell"
```ps1
$env:VCPKG_FEATURE_FLAGS="manifests"
```
=== "Bash"
```bash
export VCPKG_FEATURE_FLAGS="manifests"
```
15 changes: 15 additions & 0 deletions docs/feature-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Registry 기능 설명

* [Using registries](https://learn.microsoft.com/en-us/vcpkg/consume/git-registries)
* [Creating registries](https://learn.microsoft.com/en-us/vcpkg/maintainers/registries)

환경변수를 사용해 기능을 활성화 하는 방법

=== "PowerShell"
```ps1
$env:VCPKG_FEATURE_FLAGS="registries"
```
=== "Bash"
```bash
export VCPKG_FEATURE_FLAGS="registries"
```
41 changes: 41 additions & 0 deletions docs/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 참고자료

문서, 예제 작성을 위한 참고자료 목록

## vcpkg 공식 문서 & 저장소

* [vcpkg.io](https://vcpkg.io/en/packages)
* [GitHub: microsoft/vcpkg-tool](https://github.com/microsoft/vcpkg-tool)

## Microsoft

* [https://learn.microsoft.com/en-us/vcpkg/](https://learn.microsoft.com/en-us/vcpkg/)
* [Using registries](https://learn.microsoft.com/en-us/vcpkg/consume/git-registries)
* [Creating registries](https://learn.microsoft.com/en-us/vcpkg/maintainers/registries)

### C++ Team Blog

* [Category: Vcpkg](https://devblogs.microsoft.com/cppblog/category/vcpkg/)
* 2021-03-24 [How to start using registries with vcpkg](https://devblogs.microsoft.com/cppblog/how-to-start-using-registries-with-vcpkg/)

## GitHub

* [Topic: `vcpkg-registry`](https://github.com/topics/vcpkg-registry)
* [Topic: `vcpkg`](https://github.com/topics/vcpkg)
* [GitHub: microsoft/vcpkg Discussions](https://github.com/microsoft/vcpkg/discussions)
* [저장소 README.md](https://github.com/luncliff/vcpkg-registry?tab=readme-ov-file#vcpkg-registry)

## CMake 가이드

* [Using Dependencies Guide](https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html)
* [Dependency Provider](https://cmake.org/cmake/help/latest/command/cmake_language.html#dependency-providers)

## JetBrains Developer Ecosystem Survey

C++ 패키지 매니저 관련 내용은 2019년 이후 조사에서 확인할 수 있습니다.

* https://www.jetbrains.com/lp/devecosystem-2019/cpp/
* https://www.jetbrains.com/lp/devecosystem-2020/cpp/
* https://www.jetbrains.com/lp/devecosystem-2021/cpp/
* https://www.jetbrains.com/lp/devecosystem-2022/cpp/
* https://www.jetbrains.com/lp/devecosystem-2023/cpp/
6 changes: 5 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ repo_url: https://github.com/luncliff/vcpkg-registry

copyright: "CC0 1.0 Public Domain"


markdown_extensions:
- admonition
- pymdownx.details
Expand Down Expand Up @@ -66,3 +65,8 @@ theme:
docs_dir: docs
nav:
- Home: vcpkg-for-kor.md
- References: references.md
- Features:
- Binary Caching: feature-binarycaching.md
- Registry: feature-registry.md
- Manifest: feature-manifest.md