# wikar/rsdk architecture

> Architecture diagram of the GitHub repository wikar/rsdk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wikar/rsdk
- Repository: https://github.com/wikar/rsdk

## Overview

rsdk is RadxaOS Software Development Kit: a command-line toolkit for configuring a development environment and building, installing, and interacting with RadxaOS images. Its broader infrastructure tooling manages package, product, and repository workflows. The graph reflects the command and subsystem boundaries visible in the tree; source excerpts were sparse, so detailed command-to-command wiring is not asserted.

Main entry points: [`src/bin/rsdk`](https://github.com/wikar/rsdk/blob/main/src/bin/rsdk) (rsdk CLI), [`src/libexec/rsdk/rsdk-build`](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-build) (Image build), [`src/libexec/rsdk/rsdk-infra-build`](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-build) (Infra build), [`src/libexec/rsdk/rsdk-infra-package-update`](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-package-update) (Package update)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and environment"]
  node_cli["rsdk CLI"]
  node_setup["Setup"]
  node_config["Configuration"]
  node_shell["Shell access"]
  node_chroot["Chroot access"]
  node_install["Image install"]
end

subgraph group_image["Image building"]
  node_build["Image build"]
  node_buildhelpers["Build helpers"]
  node_imageconfig["Image definition<br/>[image.jsonnet]"]
  node_rootfs["Root filesystem<br/>[rootfs.jsonnet]"]
end

subgraph group_infra["Infrastructure workflows"]
  node_infrabuild["Infra build"]
  node_package["Package update"]
  node_product["Product build"]
  node_repo["Repository update"]
  node_packagedata["Package templates"]
  node_productdata["Product templates"]
  node_repodata["Repository templates"]
end

subgraph group_data["Build data"]
  node_configs["Device configuration"]
end

node_user(("Developer"))
node_artifacts["OS image"]

node_user -->|"runs"| node_cli
node_cli -->|"dispatches"| node_setup
node_cli -->|"dispatches"| node_config
node_cli -->|"dispatches"| node_shell
node_cli -->|"dispatches"| node_chroot
node_cli -->|"dispatches"| node_install
node_cli -->|"dispatches"| node_build
node_cli -->|"dispatches"| node_infrabuild
node_cli -->|"dispatches"| node_package
node_cli -->|"dispatches"| node_product
node_cli -->|"dispatches"| node_repo
node_build -->|"uses definition"| node_imageconfig
node_build -->|"uses definition"| node_rootfs
node_build -->|"reads settings"| node_configs
node_build -->|"uses helpers"| node_buildhelpers
node_build -->|"produces"| node_artifacts
node_infrabuild -->|"dispatches"| node_package
node_infrabuild -->|"dispatches"| node_product
node_infrabuild -->|"dispatches"| node_repo
node_package -->|"uses templates"| node_packagedata
node_product -->|"uses templates"| node_productdata
node_repo -->|"uses templates"| node_repodata

click node_cli "https://github.com/wikar/rsdk/blob/main/src/bin/rsdk"
click node_setup "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-setup"
click node_config "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-config"
click node_shell "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-shell"
click node_chroot "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-chroot"
click node_install "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-install"
click node_build "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-build"
click node_buildhelpers "https://github.com/wikar/rsdk/tree/main/src/libexec/rsdk/build"
click node_imageconfig "https://github.com/wikar/rsdk/blob/main/src/share/rsdk/build/image.jsonnet"
click node_rootfs "https://github.com/wikar/rsdk/blob/main/src/share/rsdk/build/rootfs.jsonnet"
click node_configs "https://github.com/wikar/rsdk/tree/main/src/share/rsdk/configs"
click node_infrabuild "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-build"
click node_package "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-package-update"
click node_product "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-product-build"
click node_repo "https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-repo-update"
click node_packagedata "https://github.com/wikar/rsdk/tree/main/src/share/rsdk/infra-package"
click node_productdata "https://github.com/wikar/rsdk/tree/main/src/share/rsdk/infra-product"
click node_repodata "https://github.com/wikar/rsdk/tree/main/src/share/rsdk/infra-repo"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_setup,node_config,node_shell,node_chroot,node_install toneBlue
class node_build,node_buildhelpers,node_imageconfig,node_rootfs toneAmber
class node_infrabuild,node_package,node_product,node_repo,node_packagedata,node_productdata,node_repodata toneMint
class node_configs toneRose
class node_user,node_artifacts toneIndigo
```

## Components

### CLI and environment

- [rsdk CLI](https://github.com/wikar/rsdk/blob/main/src/bin/rsdk): `src/bin/rsdk`
- [Setup](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-setup): `src/libexec/rsdk/rsdk-setup`
- [Configuration](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-config): `src/libexec/rsdk/rsdk-config`
- [Shell access](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-shell): `src/libexec/rsdk/rsdk-shell`
- [Chroot access](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-chroot): `src/libexec/rsdk/rsdk-chroot`
- [Image install](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-install): `src/libexec/rsdk/rsdk-install`

### Image building

- [Image build](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-build): `src/libexec/rsdk/rsdk-build`
- [Build helpers](https://github.com/wikar/rsdk/tree/main/src/libexec/rsdk/build): `src/libexec/rsdk/build`
- [Image definition](https://github.com/wikar/rsdk/blob/main/src/share/rsdk/build/image.jsonnet): `src/share/rsdk/build/image.jsonnet`
- [Root filesystem](https://github.com/wikar/rsdk/blob/main/src/share/rsdk/build/rootfs.jsonnet): `src/share/rsdk/build/rootfs.jsonnet`

### Infrastructure workflows

- [Infra build](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-build): `src/libexec/rsdk/rsdk-infra-build`
- [Package update](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-package-update): `src/libexec/rsdk/rsdk-infra-package-update`
- [Product build](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-product-build): `src/libexec/rsdk/rsdk-infra-product-build`
- [Repository update](https://github.com/wikar/rsdk/blob/main/src/libexec/rsdk/rsdk-infra-repo-update): `src/libexec/rsdk/rsdk-infra-repo-update`
- [Package templates](https://github.com/wikar/rsdk/tree/main/src/share/rsdk/infra-package): `src/share/rsdk/infra-package`
- [Product templates](https://github.com/wikar/rsdk/tree/main/src/share/rsdk/infra-product): `src/share/rsdk/infra-product`
- [Repository templates](https://github.com/wikar/rsdk/tree/main/src/share/rsdk/infra-repo): `src/share/rsdk/infra-repo`

### Build data

- [Device configuration](https://github.com/wikar/rsdk/tree/main/src/share/rsdk/configs): `src/share/rsdk/configs`

### Other components

- **Developer**
- **OS image**

## Connections

- Developer → rsdk CLI: runs
- rsdk CLI → Setup: dispatches
- rsdk CLI → Configuration: dispatches
- rsdk CLI → Shell access: dispatches
- rsdk CLI → Chroot access: dispatches
- rsdk CLI → Image install: dispatches
- rsdk CLI → Image build: dispatches
- rsdk CLI → Infra build: dispatches
- rsdk CLI → Package update: dispatches
- rsdk CLI → Product build: dispatches
- rsdk CLI → Repository update: dispatches
- Image build → Image definition: uses definition
- Image build → Root filesystem: uses definition
- Image build → Device configuration: reads settings
- Image build → Build helpers: uses helpers
- Image build → OS image: produces
- Infra build → Package update: dispatches
- Infra build → Product build: dispatches
- Infra build → Repository update: dispatches
- Package update → Package templates: uses templates
- Product build → Product templates: uses templates
- Repository update → Repository templates: uses templates
