Service SDK Examples
Using Docker images
This guide explains how to run the examples from tomusdrw/jam-examples using docker images.
JAM SDK
First, build the docker image.
$ docker build -f jam-sdk.Dockerfile -t jam-sdk .
Then cd into the example code directory:
$ cd jam-examples/empty-jamsdk
And build:
$ docker run --rm -v $(pwd):/app jam-sdk jam-pvm-build -m service
Unit tests
To run unit tests:
$ docker run --rm -v $(pwd):/app jam-sdk cargo test
JamBrains SDK
The docker image provided by JamBrains is going to do all the work here:
Pull the image:
$ docker pull ghcr.io/jambrains/service-sdk:latest
On Apple Silicon, you may need to add: --platform linux/amd64.
And build:
$ cd jam-examples/empty-jambrains
$ docker run --rm -v $(pwd):/app ghcr.io/jambrains/service-sdk:latest single-file main.c
Jade (Spacejam)
First, build the docker image.
$ docker build -f jade.Dockerfile -t jade .
Then cd into the example code directory:
$ cd jam-examples/empty-jade
And build:
$ docker run --rm -v $(pwd):/app jade
Notice that “cargo” is set as the entry point of this docker image (and “build” as the default command).
Unit tests
To run unit tests:
$ docker run --rm -v $(pwd):/app jade test