Skip to content

The workspace script: `dk.u`

dk.u is a unified script. In other words, it is a Markdoc document with reserved sections and some specially formatted areas.

The basic structure of a dk.u is:

# YOUR PROJECT TITLE
## Overview
## Workspace
## License

Reserved sections are case-insensitive. That means ## Overview is treated the same as ## overview.

The ## Workspace section lists the package's dependencies as %% import directives.

Typically you won't hand-edit this section. Commands like add and update in the dk0 Reference Implementation are available to manage imports.

Each import pins an exact version and its checksums. And just like a JavaScript package-lock.json or a Python uv.lock, the section behaves like a miniature lock file:

## workspace
%% import {
.. type="github-l2",
.. repo="dkpkg/CommonsBase_Std" }
'import'
'github-l2'
{ { 'CommonsBase_Std', '2.5.202606240625', {
'blake2b-256:6450d810180892d71647fe63c2313d17df5ce23eef80e1050a13cf7ad4417b31',
'sha256:9eac4142bc0a80e5b51d3b89e83069672873ec628256afe849408ab64f954100',
'sha1:8c02d3bf95fe54717dd1798f292c6d6688a63faa'
} } }

The two spaces and the %% start a Lua workspace command, and the two spaces and the .. continue the Lua workspace command.

The import { type="github-l2" }, for example, imports a distribution from a GitHub release and verifies it with GitHub's SLSA Level 2 attestation.

This section is a summary of the package for documentation.

For example:

## Overview
`CommonsBase_GNU` provides the GNU command-line tools that other dk packages and
your projects depend on.

The ## License section is a SPDX license expression for the package.

Standard licenses are named directly:

## License
GPL-3.0-or-later

Often complex licenses are required. Here is a SPDX license expression that combines several open source licenses with a custom license:

## License
BSD-3-Clause AND Apache-2.0 AND MIT AND LicenseRef-CMake-Copyright
### LicenseRef-CMake-Copyright
CMake - Cross Platform Makefile Generator
Copyright 2000-2025 Kitware, Inc. and Contributors. All rights reserved.
...

Each LicenseRef-<name> must have its own ### LicenseRef-<name> subsection.