Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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.


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?


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.


Thanks for the feedback - we're working on new docs this year actually :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: