This guide covers how to build, test, and contribute to this project.
- Go 1.25 or higher
- LimaVM (for e2e testing)
- Remoteproc Simulator (for e2e testing and manual testing without hardware)
The project consists of two main components:
- Containerd shim (
cmd/containerd-shim-remoteproc-v1/) - Integration with containerd-based runtimes - Container runtime (
cmd/remoteproc-runtime/) - Standalone OCI runtime
go build ./cmd/containerd-shim-remoteproc-v1go build ./cmd/remoteproc-runtimeGOOS=linux. If cross-compiling, specify the target architecture with GOARCH=arm64.
The project uses golangci-lint for Go code quality checks.
# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Run linter
golangci-lint run
# Run linter with auto-fix
golangci-lint run --fixgo test -v -race ./internal/...Slow tests require LimaVM to be installed. They create temporary VMs to test the shim with Docker.
# Install Lima first
brew install lima # macOS
# or follow instructions at https://lima-vm.io/docs/installation/
# Run tests
go test -v ./e2e/...Useful for development without access to hardware with Remoteproc support.
ℹ️ Remoteproc Simulator's arguments aren't arbitrary:
- Custom root directory, set via
--root-dirneeds to match custom root set via-ldflags - Remoteproc name set via
--nameneeds to match theremoteproc.nameannotation
--network=host), as the proxy runs in the host's network namespace.
-
Build and install the shim and runtime with custom root
go build ./cmd/containerd-shim-remoteproc-v1
go build -ldflags "-X github.com/arm/remoteproc-runtime/internal/rootpath.prefix=/tmp/test-root" \ ./cmd/remoteproc-runtimeSee "Install the shim and runtime" in Usage Guide.
-
Build the test image
The repository includes a
Dockerfileintestdata/for testing.docker build ./testdata -t test-remoteproc-image
-
Setup Remoteproc Simulator
# Create test root directory mkdir -p /tmp/test-root # Run simulator remoteproc-simulator --root-dir /tmp/test-root --name test-processor
-
Run the container
docker run \ --runtime io.containerd.remoteproc.v1 \ --annotation remoteproc.name="test-processor" \ --network=host \ test-remoteproc-image
-
Build the runtime with custom root
go build -ldflags "-X github.com/arm/remoteproc-runtime/internal/rootpath.prefix=/tmp/test-root" \ ./cmd/remoteproc-runtime -
Setup Remoteproc Simulator
# Create test root directory mkdir -p /tmp/test-root # Run simulator remoteproc-simulator --root-dir /tmp/test-root --name fancy-mcu
-
Use the test bundle The repository includes a test OCI bundle in
e2e/testdata/bundle/.# Create container ./remoteproc-runtime create --bundle testdata/bundle my-container # Start container ./remoteproc-runtime start my-container # Check state ./remoteproc-runtime state my-container # Cleanup ./remoteproc-runtime kill my-container ./remoteproc-runtime delete my-container
The CI pipeline runs on every push and pull request to main.
PRs must have semantic commit titles (enforced by GitHub Actions).
Releases are automated using GoReleaser when a new tag is pushed:
# Create and push a new version tag
git tag v0.1.0
git push origin v0.1.0The release workflow will:
-
Run the full CI test suite
-
Build binaries for multiple platforms
-
Create a GitHub release with artifacts