News for hackers. Stuff that matters.
Re:Apple Pkl by mholt on Thursday February 22, 2024 @05:44PM (#39474368)
I wrote a config adapter for Caddy so you can write your Caddy configs with Pkl: https://github.com/caddyserver/pkl-adapter

The big gotcha is it's only implemented in Java. So any language bindings have to shell out to a subprocess to actually do any work.

Re:Apple Pkl by bioballer on Thursday February 22, 2024 @06:00PM (#39474532)
Very cool!

You might want to consider also publishing a schema for it too, as a Pkl package. The package can simply be published as a GitHub release (see details in this post here: https://github.com/apple/pkl/discussions/85#discussioncommen...)

Also, despite being written in Java, Pkl is distributed as a native executable for macOS and Linux (Windows coming soon).

But yeah, you do need the executable installed on your system in order for our pkl-go bindings to work.

Re:Apple Pkl by bbkane on Thursday February 22, 2024 @06:53PM (#39475028)
Needing the pkl CLI adds a runtime dependency I'd rather not have.

Is there any way to use pkl from Go without needing to shell out? Maybe Go library that calls a wasm blob or something?

Re:Apple Pkl by parhamn on Thursday February 22, 2024 @06:44PM (#39474940)
Thats awesome, look forward to trying it. If you really forced me to say anything negative about caddy (it's such a delightful tool), would be the config and the configs docs/validation. Relatedly, I feel like just having some cargo cultable config examples for basic setups would be great.
Re:Apple Pkl by mholt on Friday February 23, 2024 @09:20AM (#39480875)
Thanks for the feedback - we're working on new docs this year actually :)