|
| 1 | +# Implementations |
| 2 | + |
| 3 | +Production implementations of the Partitioned Container Format family, one |
| 4 | +directory per language. Each language directory holds **one subfolder per |
| 5 | +library**, so that profiles built *on top of* PCF (e.g. PFS) can live next to it: |
| 6 | + |
| 7 | +``` |
| 8 | +implementations/ |
| 9 | +├── php/ |
| 10 | +│ └── pcf/ # kduma/pcf (Packagist split) |
| 11 | +├── ts/ |
| 12 | +│ ├── package.json # npm workspace root (private) |
| 13 | +│ └── pcf/ # @kduma-oss/pcf (npm) |
| 14 | +└── dotnet/ |
| 15 | + ├── Directory.Build.props # shared metadata + lockstep <Version> |
| 16 | + └── pcf/ # KDuma.Pcf (NuGet) |
| 17 | +``` |
| 18 | + |
| 19 | +The Rust reference under [`../reference/`](../reference/) is the canonical model: |
| 20 | +`PFS-MS-v1.0` depends on `PCF-v1.0` via a path dependency with a pinned version, |
| 21 | +and every package is versioned **in lockstep** by |
| 22 | +[`release-prepare.yml`](../../.github/workflows/release-prepare.yml). |
| 23 | + |
| 24 | +## Adding a library that depends on PCF (e.g. PFS) |
| 25 | + |
| 26 | +Drop a sibling folder (`…/pfs/`) next to `…/pcf/` and wire the dependency using |
| 27 | +the per-ecosystem mechanism below. Local development resolves against the |
| 28 | +on-disk PCF; published artifacts depend on the released PCF package. |
| 29 | + |
| 30 | +| Language | Dependency declaration in the PFS manifest | Local dev | Published | |
| 31 | +|----------|--------------------------------------------|-----------|-----------| |
| 32 | +| Rust | `pcf = { path = "../pcf", version = "X" }` | source on disk | crates.io | |
| 33 | +| .NET | `<ProjectReference Include="..\..\..\pcf\src\Pcf\Pcf.csproj" />` | project on disk | `dotnet pack` emits a NuGet dependency `KDuma.Pcf >= X` | |
| 34 | +| TS / npm | `"@kduma-oss/pcf": "^X"` + add `pfs` to the root `workspaces` array | workspace symlink to `../pcf` | npm registry | |
| 35 | +| PHP | `repositories: [{ type: "path", url: "../pcf" }]` + `require: { "kduma/pcf": "^X" }` | path-repo symlink to `../pcf` | Packagist (path repo ignored downstream) | |
| 36 | + |
| 37 | +What each ecosystem already provides for "readiness": |
| 38 | + |
| 39 | +- **TypeScript** — `implementations/ts/package.json` is a private **npm |
| 40 | + workspaces** root with a single hoisted `package-lock.json`. Add `"pfs"` to |
| 41 | + `workspaces`; CI runs package scripts with `-w @kduma-oss/<pkg>`. |
| 42 | +- **.NET** — `implementations/dotnet/Directory.Build.props` holds the shared |
| 43 | + package metadata and the single lockstep `<Version>`, auto-imported by every |
| 44 | + project beneath it. A new library only declares its own `PackageId` / |
| 45 | + `Description` and a `ProjectReference` to PCF. |
| 46 | +- **PHP** — each library is a self-contained Composer package that is mirrored to |
| 47 | + its own Packagist repo by a split workflow. A new library gets its own |
| 48 | + `composer.json` (with the path repo above) and a sibling split workflow. |
0 commit comments