-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust language bingings/code generation #114
Comments
+1 for this In the meantime we'd have to just use |
This is a totally valid ask and you're not the first to ask. The core team lacks bandwidth at the moment, so we can't make any promises about this in the foreseeable future. That said, community contributed Typescript bindings are approaching done after little more than a week. If anyone wants to pick this up, I'm sure |
I think I will probably work on this after Typescript |
Vote for Rusting binding:
|
This would require actually building a Pkl JIT interpreter in Rust. This is a much larger task. The goal with bindings is to create a type safe way to interact with the pkl binary (in server mode). In time, the bindings will be changed to use Pkl as a linked library instead of over exec - but this may still be quite large, and GraalVM based! If someone wants to try and build a new interpreter for Pkl in Rust, they should absolutely go ahead, but it's definitely beyond me! |
I'm brand new to PKL so take this with a sizable pile of salt but what would a binding to Rust entail? I am quite interested in knowing what goes in to making a typesafe / production language binding. |
This does work, sort of. You could technically call The binding should be parsing the evaluator responses according to the spec. The task is mainly turning the binary encoding into a format that can be deserialized, which would include doing most of the work serde json does. For example, evaluating this pkl file: address = "127.0.0.1"
database {
username = "root"
password = "password"
} would produce an output like this. A good reference for how this is implemented is pkl-go. I also have a working binding for Rust |
I'm really interested in using this in my rust projects, any plans on supporting serde/code generation?
The text was updated successfully, but these errors were encountered: