Skip to content

Commit fb0e162

Browse files
DOCS-4018: Add comprehensive table of supported platforms for cloud-build (#4336)
1 parent 4602e0d commit fb0e162

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

docs/operate/get-started/other-hardware/manage-modules.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ At the end of your <file>meta.json</file>, add the build configuration:
8585
<!-- { {< tabs >}}
8686
{ {% tab name="Single Build File" %}} -->
8787

88-
```json {class="line-numbers linkable-line-numbers" data-line="5-8"}
88+
```json {class="line-numbers linkable-line-numbers" data-line="5-9"}
8989
{
9090
"module_id": "example-module",
9191
...
@@ -94,11 +94,24 @@ At the end of your <file>meta.json</file>, add the build configuration:
9494
"build": "./build.sh", // command that will build your module's tarball
9595
"path" : "dist/archive.tar.gz", // optional - path to your built module tarball
9696
"arch" : ["linux/amd64", "linux/arm64", "darwin/arm64"], // architecture(s) to build for
97-
"darwin_deps" : ["go", "x264", "nlopt-static"] // optional - Homebrew dependencies for Darwin builds. Explicitly pass `[]` for empty. Default : ["go", "pkg-config", "nlopt-static", "x264", "jpeg-turbo", "ffmpeg"].
97+
"darwin_deps" : ["go", "x264", "nlopt-static"] // optional - Homebrew dependencies for Darwin builds. Explicitly pass `[]` for empty.
9898
}
9999
}
100100
```
101101

102+
{{% expand "Cloud build configuration attributes" %}}
103+
104+
<!-- prettier-ignore -->
105+
| Attribute | Inclusion | Description |
106+
| --------- | --------- | ----------- |
107+
| `"setup"` | Optional | Command to run for setting up the build environment. |
108+
| `"build"` | **Required** | Command to run to build the module tarball. |
109+
| `"path"` | Optional | Path to the build module tarball. |
110+
| `"arch"` | **Required** | Array of architectures to build for. Options: `"any"`, `"linux/any"`, `"darwin/any"`, `"any/amd64"`, `"any/arm64"`, `"any/arm32v6"`, `"any/arm32v7"`, `"linux/amd64"`, `"linux/arm64"`, `"linux/arm32v6"`, `"linux/arm32v7"`, `"darwin/amd64"`, `"darwin/arm64"`, `"windows/amd64"`. For more information see [Supported platforms for automatic updates](#supported-platforms-for-automatic-updates). |
111+
| `"darwin_deps"` | **Required** | Array of homebrew dependencies for Darwin builds. Explicitly pass `[]` for empty. Default: `["go", "pkg-config", "nlopt-static", "x264", "jpeg-turbo", "ffmpeg"]` |
112+
113+
{{% /expand %}}
114+
102115
{{< expand "Python module example" >}}
103116

104117
The following code snippet demonstrates an example `setup.sh` for a Python module:
@@ -244,6 +257,26 @@ For more details, see the [`upload-module` GitHub Action documentation](https://
244257

245258
Once the build is complete, the module will automatically update in the [Viam Registry](https://app.viam.com/registry), and the machines set to use the latest [version](/operate/reference/module-configuration/#module-versioning) of the module will automatically update to the new version.
246259

260+
#### Supported platforms for automatic updates
261+
262+
When using cloud build, you can specify which platforms you want to build your module for in the `arch` field of your `meta.json` file.
263+
The following table lists all available platforms:
264+
265+
<!-- prettier-ignore -->
266+
| Platform | Recommended | Supported in cloud build | Container used by cloud build | Notes |
267+
|----------|-------------|--------------------------|------------------------------|-------|
268+
| `linux/amd64` | ✅ | ✅ | Ubuntu | Standard x86_64 Linux platform, |
269+
| `linux/arm64` | ✅ | ✅ | Ubuntu | For ARM64 Linux devices like Raspberry Pi 4, |
270+
| `darwin/arm64` | ✅ | ✅ | macOS | For Apple Silicon Macs (M1/M2/M3). |
271+
| `linux/arm32v6` | ✅ | ❌ | N/A | For older ARM devices; must be built manually. |
272+
| `linux/arm32v7` | ✅ | ❌ | N/A | For 32-bit ARM devices; must be built manually. |
273+
| `windows/amd64` | ✅ | ⚠️ | N/A | <ul><li>Cloud builds work for Go modules but have issues. linking to C libraries.</li><li>Windows support is still in development.</li></ul> |
274+
| `darwin/amd64` | ❌ | ❌ | N/A | Intel Macs; not recommended as Apple is phasing this platform out |
275+
276+
{{% alert title="Note" color="note" %}}
277+
While the registry supports additional platforms like `windows/amd64`, `linux/arm32v6`, and `linux/arm32v7`, these are not currently supported by cloud build and must be [built and uploaded manually](#update-manually).
278+
{{% /alert %}}
279+
247280
### Update manually
248281

249282
Use the [Viam CLI](/dev/tools/cli/) to manually update your module:
@@ -352,8 +385,8 @@ To transfer ownership of a module from one organization to another:
352385
1. Select the new organization from the dropdown menu, then click **Transfer module**.
353386

354387
1. (Recommended) Transfer the GitHub repository containing the module code to the new owner.
355-
Be sure to remove the existing secrets from the repositorys settings before transferring.
356-
If the repository is using Viams cloud build, the secrets contain an organization API key that will be exposed to the new owner after the repository transfer.
388+
Be sure to remove the existing secrets from the repository's settings before transferring.
389+
If the repository is using Viam's cloud build, the secrets contain an organization API key that will be exposed to the new owner after the repository transfer.
357390

358391
1. Update the `meta.json` file to reflect the new organization:
359392

0 commit comments

Comments
 (0)