Product
February 20, 2024

New Feature: Publish Modules to Multiple Platforms with Cloud Build

Written by
Natalia Jacobwitz
Product Manager

Cloud Build lets you start on any one platform and ship to every platform.

The Viam Modular Registry enables module authors to extend Viam’s functionality by creating modules that anyone in the world can use on their machine, opening up a world of potential new customers. Now, with Viam’s Cloud Build, we make it even easier to publish a module to multiple platforms so that you can further expand the reach of your module. 

Previously, it was easy to build your module and publish it for the architecture you specifically worked on. For example, if you built your module on a Raspberry Pi, your module would work for Linux machines with arm64 architecture; however, it wouldn’t work by default for someone running Viam on their Mac. If you wanted to extend your module to work also on a Mac, you would have needed to find yourself a laptop running macOS to build the module there so that someone else would be able to use it on their Mac. On top of that, you would have had to do this every time you made an update to your module!

Now, with Viam Cloud Build, we let you indicate which architectures you want your module to build on, and we simply build it for you. No matter what language you wrote your module in – C++, Python, Golang, etc. – the new Viam Cloud build works for any of them. You simply need to add the list of architectures you want the module built for inside your meta.json, and then you can use Viam’s provided action template inside a new workflow with GitHub Actions. Then as part of your continuous integration flow, each time you update your module, Viam will build your module for the desired platforms too. 

At this moment, with Cloud Build you can build your module for the following architectures: linux/amd64, linux/arm64, and darwin/arm64. To see the full list of architectures, check out our docs here

Cloud Build is our recommended path for module authors adding CI to a new module.

The goal here was really to expand the reach and enable more people to use any module with less effort for the module creators. 

I have created a brief video outlining the steps I described in this post to publish a module to multiple platforms. 

If you’re ready to start building, follow our docs and follow the instructions for “CI with build-action”, or check out the README and the open source code behind this feature.

on this page

Get started with Viam today!