A collection of docker images to generate code bindings for pkl models (in either Swift, Java, or Kotlin). Also supports PklDoc generation.
Current builds are created for pkl version 0.29.0, 0.29.1, 0.30.0, 0.30.1 and 0.30.2.
Given an input model of example.pkl, you can generate a code binding for a selected platform and pkl version using the following command:
docker run --rm -v "./:/data" ghcr.io/emilymclean/pkl-codegen-<platform>:<version> /data/example.pkl -o /data/javaSo, for Kotlin using pkl version 0.30.2:
docker run --rm -v "./:/data" ghcr.io/emilymclean/pkl-codegen-kotlin:0.30.2 /data/example.pkl -o /data/javaThe supported platforms/images are as follows:
| Output | Image |
|---|---|
| Kotlin | pkl-codegen-kotlin |
| Java | pkl-codegen-java |
| Swift | pkl-codegen-swift |
| Go | pkl-codegen-go |
| PklDoc | pkl-codegen-doc |
Versions of the container generally adhere to the following versioning format: <pkl version>-<container release version>. For example, for pkl 0.30.2 and release 1.0.0, this would be 0.30.2-1.0.0. In addition, a tag for the container major version, nightly version, and major+nightly version is also published. In the same circumstance as above, this would be 0.30.2-1, 0.30.2-nightly, and 0.30.2-1-nightly respectively. It is highly recommended to at least pin to a major version to prevent breaking changes from accidentally interfering with use.