Experimental
Pkl configuration format (>= v0.17)
Thanks to the rpkl
crate, we have experimental support for the
Pkl configuration language. Pkl is a dynamic and programmable
configuration format built and maintained by Apple.
port = 3000
secure = true
allowedHosts = List(".localhost")
Pkl support can be enabled with the
pkl
Cargo feature.
Caveats
Unlike our other static formats, Pkl requires the following to work correctly:
- The
pkl
binary must exist onPATH
. This requires every user to install Pkl onto their machine. - Pkl parses local file system paths only.
- Passing source code directly to
ConfigLoader
is NOT supported. - Reading configuration from URLs is NOT supported, but can be worked around by implementing a
custom file-based
Cacher
.
- Passing source code directly to
Known issues
- The
rpkl
crate is relatively new and may be buggy or have missing/incomplete functionality. - When parsing fails and a code snippet is rendered in the terminal using
miette
, the line/column offset may not be accurate.