An open API service indexing awesome lists of open source software.

https://github.com/emilymclean/pkl-codegen

A collection of docker images to generate code bindings for pkl models (in either Swift, Java, or Kotlin).
https://github.com/emilymclean/pkl-codegen

docker-image pkl

Last synced: about 1 month ago
JSON representation

A collection of docker images to generate code bindings for pkl models (in either Swift, Java, or Kotlin).

Awesome Lists containing this project

README

        

# pkl-codegen
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.26.0, 0.26.1, 0.26.2, 0.26.3, 0.27.0, 0.27.1, 0.27.2, 0.28.0, 0.28.1 and 0.28.2.

## Usage
Given an input model of `example.pkl`, you can generate a code binding for a selected platform and pkl version using the following command:

```sh
docker run --rm -v "./:/data" ghcr.io/emilymclean/pkl-codegen-: /data/example.pkl -o /data/java
```

So, for Kotlin using pkl version 0.28.2:

```sh
docker run --rm -v "./:/data" ghcr.io/emilymclean/pkl-codegen-kotlin:0.28.2 /data/example.pkl -o /data/java
```

The 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` |

### Versioning
Versions of the container generally adhere to the following versioning format: `-`. For example, for pkl `0.28.2` and release `1.0.0`, this would be `0.28.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.28.2-1`, `0.28.2-nightly`, and `0.28.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.