This is a sample project that demonstrates Pkl <> Swift integration.
This is a basic HTTP server that is configured via Pkl in the pkl/
directory.
Directory |
Description |
|
Pkl configuration sources |
|
Generated Swift sources from Pkl |
|
Swift files |
Generated sources are already checked into git for learning purposes.
To generate new Pkl sources, first install the Swift code generator:
curl https://github.com/apple/pkl-swift/releases/download/0.2.0/pkl-gen-swift-macos.bin -o pkl-gen-swift
chmod +x pkl-gen-swift
With that installed, generate Swift sources via:
pkl-gen-swift pkl/**.pkl -o Sources/Gen