Skip to content

Add an external function to pkl #1071

Answered by HT154
brettsaunders21 asked this question in Q&A

You must be logged in to vote

There are two primary ways to extend Pkl with functionality like this: language binding libraries and external readers.

Using a full language binding library provides Pkl evaluation as an API to your own codebase. Your application can register custom resource or module schemes via that API that your Pkl code can use via read or import constructs. The disadvantage of this approach is that you can no longer use the pkl eval CLI to test and debug your modules.

External readers are small-standalone binaries that Pkl spawns during evaluation to implement functionally identical extensions. Instead of hosting the evaluator via a language binding library, the standard pkl eval CLI is used and the…

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by brettsaunders21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants