Skip to content
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
63 changes: 63 additions & 0 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: deploy-site

# Render `pkgs/**/*.lua` into a static HTML browser via xpkgindex and
# publish to GitHub Pages. Re-runs on any pkgs/ change merged into main,
# and can be kicked off manually for theme/config tweaks.

on:
push:
branches: [main]
paths:
- 'pkgs/**'
- '.xpkgindex.json'
- '.github/workflows/deploy-site.yml'
workflow_dispatch:

# GITHUB_TOKEN scopes for the deploy step.
permissions:
contents: read
pages: write
id-token: write

# One concurrent run per ref; in-flight runs get cancelled when a new
# push arrives (the latest deploy is always the one we want live).
concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install xpkgindex
run: pip install git+https://github.com/openxlings/xpkgindex.git
- name: Generate static site
env:
# xpkgindex >= Apr 2026 surfaces these on the About page.
XPKGINDEX_BUILD_TIME: ${{ github.event.head_commit.timestamp }}
XPKGINDEX_BUILD_COMMIT: ${{ github.sha }}
XPKGINDEX_BUILD_COMMIT_URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
run: |
# workflow_dispatch leaves head_commit.timestamp empty.
if [ -z "$XPKGINDEX_BUILD_TIME" ]; then
XPKGINDEX_BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
export XPKGINDEX_BUILD_TIME
fi
xpkgindex generate . --output site
- uses: actions/upload-pages-artifact@v3
with:
path: ./site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
32 changes: 32 additions & 0 deletions .xpkgindex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"site": {
"title": "mcpp Package Index",
"description": "Modular C++23 packages for the mcpp build tool",
"logo": "mcpp Package Index"
},
"links": {
"github": "https://github.com/mcpp-community/mcpp-index",
"custom": [
{"label": "mcpp", "url": "https://github.com/mcpp-community/mcpp"},
{"label": "xpkg V1 spec", "url": "https://github.com/d2learn/xim-pkgindex/blob/main/docs/V1/xpackage-spec.md"},
{"label": "mcpp ext", "url": "https://github.com/mcpp-community/mcpp/blob/main/docs/04-schema-xpkg-extension.md"}
]
},
"about": {
"project_name": "mcpp",
"project_url": "https://github.com/mcpp-community/mcpp",
"description": "Modern C++23 build & package management tool — modules-first, xlings-driven, single-binary install",
"maintainers": ["mcpp-community"],
"license": "Apache-2.0"
},
"theme": {
"primary_color": "#00d4ff",
"style": "dark"
},
"install_command_template": "mcpp add {name}@{version}",
"pkgs_dir": "pkgs",
"install_commands": {
"unix": "curl -fsSL https://github.com/mcpp-community/mcpp/releases/latest/download/install.sh | bash",
"windows": "iwr https://github.com/mcpp-community/mcpp/releases/latest/download/install.sh -useb | bash"
}
}
47 changes: 14 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,25 @@
# mcpp-index

> Package index registry for the [`mcpp`](https://github.com/mcpp-community/mcpp) build tool.

This repository indexes modular C++23 packages that follow the
[xpkg v1 spec](https://github.com/d2learn/xim-pkgindex/blob/main/docs/V1/xpackage-spec.md)
plus the [mcpp extension segment](https://github.com/mcpp-community/mcpp/blob/dev/docs/04-schema-xpkg-extension.md).

## How is this different from xim-pkgindex / mcpplibs-index?

| Repo | Format | Build tool | Status |
|------|--------|------------|--------|
| [`d2learn/xim-pkgindex`](https://github.com/d2learn/xim-pkgindex) | xpkg v1 (Lua) | xlings + various | Official xlings index |
| [`mcpplibs/mcpplibs-index`](https://github.com/mcpplibs/mcpplibs-index) | xmake `package(...)` | xmake | mcpplibs xmake-style index |
| **`mcpp-community/mcpp-index`** (this) | xpkg v1 + mcpp ext | mcpp | Modular-only, mcpp-driven |

## Layout

```
pkgs/<letter>/<package>.lua Each indexed package
docs/ Contributor docs
.github/workflows/ CI: lint, validate, deploy
```

## Using this index

mcpp registers `mcpp-index` automatically as the default registry. With a
fresh `mcpp` install:
> Default package registry for [`mcpp`](https://github.com/mcpp-community/mcpp).
> Browse: **https://mcpp-community.github.io/mcpp-index/**

```bash
mcpp env # initializes ~/.mcpp/registry/
mcpp search hello # searches mcpp-index
mcpp add mcpplibs.templates@0.0.1 # adds to your project's mcpp.toml
mcpp build # mcpp pulls source via xlings, builds
mcpp add mcpplibs.cmdline@0.0.2 # → updates mcpp.toml
mcpp build # → fetches sources, builds
```

## Adding a package

See [docs/19-creating-mcpp-index.md](https://github.com/mcpp-community/mcpp/blob/dev/docs/19-creating-mcpp-index.md) in the mcpp repo.
Drop one [xpkg V1](https://github.com/d2learn/xim-pkgindex/blob/main/docs/V1/xpackage-spec.md)
descriptor at `pkgs/<first-letter>/<name>.lua`. Existing files (e.g.
[`pkgs/m/mbedtls.lua`](pkgs/m/mbedtls.lua),
[`pkgs/l/lua.lua`](pkgs/l/lua.lua)) are the canonical templates;
the [mcpp extension](https://github.com/mcpp-community/mcpp/blob/main/docs/04-schema-xpkg-extension.md)
covers the optional `mcpp = { ... }` segment for upstreams that
don't ship their own `mcpp.toml`. Open a PR — the `validate`
workflow lint-checks descriptors, the `deploy-site` workflow
republishes the browse site after merge.

## License

Package descriptions: CC0 (metadata is uncopyrightable). Each indexed package
has its own license.
Descriptors: CC0. Each indexed upstream keeps its own license.