Skip to content

Assets

The source code and URLs needed by your build are called assets.

The source code are workspace assets, while URLs are downloaded assets.

These are files and directories that live in the package directory (the directory with a dk.u).

They are declared in dk.u with a % unified.asset directive that names either a file= or a dir= path:

## Apparatus
### CommonsLang_DotNet.Apparatus@1.0.0
Here
% unified.asset { name="NuGetConfig", file="assets/nuget/NuGet.Config" }
\dk.asset(byteSize: "321", checksum: (sha256: "b7b2fedda9c847bdee1e5d4035460c895cda1db56c28629940bfb4d200b6bb90"))\;
% unified.asset { name="NuGetPackages", dir="assets/nuget/packages" }
\dk.asset(byteSize: "226", checksum: (sha256: "e21a238ce8fede4c01faa609588c44207a330515ce78a973e79c3443b1695ace"))\;

As shown above, the unified.asset must be in a section with a module identifier (ex. CommonsLang_DotNet.Apparatus@1.0.0).

The output blocks (the \dk.asset(...) metadata lines recording the byte size and sha256 checksum) are not meant to be hand-maintained. There will be a command like dk1 update --no-imports that recalculates the checksums on your behalf.

These are third-party sources. They are declared in a *.values.jsonc file (traditionally located at etc/dk/v/Bundle.values.jsonc). The SPECIFICATION documents what an origin is:

{
"origin": "gnu-awk",
"path": "gawk-5.3.1.tar.gz",
"size": 6264553,
"sha256": "fa41b3a85413af87fb5e3a7d9c8fa8d4a20728c67651185bb49c38a7f9382b1e",
"mirrors": ["https://ftp.gnu.org/gnu/gawk", "https://mirrors.kernel.org/gnu/gawk"]
}

A downloaded asset's source URL is mirror "/" path. In the example above that would be https://ftp.gnu.org/gnu/gawk/gawk-5.3.1.tar.gz for the first mirror.