Build and publish the SDKs that power Workshop's Ubuntu-native development environments.
SDKcraft is Canonical's tool for packaging languages, libraries, tools, and services as reusable SDKs for Workshop. Define what an SDK contains, how it is set up, and which interfaces it uses. Workshop then composes SDKs into development environments for individual projects.
Use SDKcraft to share a toolchain with your team or publish components that other Workshop users can add to their projects.
- Declarative: describe an SDK's metadata, target platforms, parts, and interfaces
in
sdkcraft.yaml, with hooks for runtime setup and lifecycle operations. - Composable: package functionality that connects to other SDKs and host resources through Workshop interfaces.
- Testable: try an SDK locally and run its tests before publishing.
- Distributable: publish SDK revisions to the SDK Store and release them through channels.
SDKcraft is available on Ubuntu and other snap-enabled Linux distributions.
For the build-and-try workflow with Workshop below,
use LXD 6.8 or later, configured and running.
Install LXD if needed, then install SDKcraft:
sudo snap install --channel=6/stable lxd # skip if LXD is already installed
sudo snap install --classic sdkcraftTo get new features as soon as they land,
add --channel=latest/edge to the SDKcraft install command.
If an existing LXD installation needs updating:
sudo snap refresh --channel=6/stable lxdFollow the Workshop setup guide to configure LXD and install Workshop for trying SDKs locally.
Create a directory for your SDK and initialize the project:
mkdir my-sdk
cd my-sdk
sdkcraft initThis creates sdkcraft.yaml together with hooks and tests.
Edit the definition to describe your SDK's software, platforms, and interfaces,
and add the hooks needed to set it up inside a workshop.
Build and package the SDK:
sdkcraft packThe output is a .sdk artifact for each platform built.
For a complete worked example, follow the SDK crafting tutorial.
Pack the SDK and copy it to Workshop's local try area:
sdkcraft tryThe artifact is now available for local use with Workshop. Follow Build an SDK to launch a workshop with it and inspect how it behaves.
Run the SDK's Spread test suite, scaffolded by sdkcraft init:
sdkcraft testThis packs the SDK and exercises it in a separate test environment with Workshop installed. Extend the scaffolded tests to cover the tools and integrations your SDK provides.
To remove build artifacts before rebuilding:
sdkcraft cleanPublishing makes an SDK available from the SDK Store. With an Ubuntu One account, sign in and reserve your SDK's name:
sdkcraft login
sdkcraft register my-sdkUpload a tested artifact and release it to an initial channel. Replace the example filename with the artifact produced by your build:
sdkcraft upload my-sdk_amd64_ubuntu@24.04.sdk --release latest/edgeList the uploaded revisions:
sdkcraft revisions my-sdkWhen a revision is ready for stable use, release it to latest/stable.
Replace <REVISION> with the revision number from the listing:
sdkcraft release my-sdk <REVISION> latest/stableWorkshop users can then select your SDK and its channel in their project definitions. See Publish an SDK for the full publishing workflow.
- SDK crafting tutorial: build your first SDK with a worked example.
- Build an SDK: define, build, and exercise an SDK locally.
- Publish an SDK: distribute revisions through the SDK Store.
- SDKcraft command reference: command usage and options.
- Reference SDKs: examples of SDK implementations.
- Workshop documentation: the environments your SDKs become part of.
To join the development effort, see How to contribute.
When working on SDKcraft itself, generate the project schema from the repository root:
uv run python sdkcraft/models/project.pyThis uses the craft-application version locked in uv.lock
to keep the generated schema aligned with the project's dependencies.
SDKcraft is released under the GPL-3.0 license.