pkl icon indicating copy to clipboard operation
pkl copied to clipboard

Ruby language bindings

Open sandstrom opened this issue 5 months ago • 7 comments

Currently the following language bindings are supported:

  • Java
  • Kotlin
  • Swift
  • Go

It would be nice to add Ruby to the list, as it's a popular programming language, and it is often used to process configuration.

sandstrom avatar Jun 24 '26 20:06 sandstrom

@sandstrom Hi! Have you implemented this? If not, I would like to take it up.

KaustAbhinand avatar Sep 07 '26 18:09 KaustAbhinand

@KaustAbhinand I haven't.

If you do, I would also look at:

  • https://github.com/apple/pkl/discussions/389#discussioncomment-17410761 (ask @bioball for pointers)
  • https://github.com/jdx/pklr and consider using https://github.com/matsadler/magnus and https://github.com/oxidize-rb/rb-sys/ to wrap the underlying rust crate. A full ruby-implementation has little value in itself here, wrapping something from e.g. Rust and providing bindings is a better approach.

sandstrom avatar Sep 08 '26 12:09 sandstrom

@sandstrom, so basically Ruby as well as Rust bindings?

KaustAbhinand avatar Sep 08 '26 12:09 KaustAbhinand

@sandstrom, so basically Ruby as well as Rust bindings?

No, just Ruby. You'd have the rust bindings as a dependency.

sandstrom avatar Sep 08 '26 18:09 sandstrom

Alright @sandstrom! I'll begin working on it. Will submit a PR shortly :-)

KaustAbhinand avatar Sep 09 '26 04:09 KaustAbhinand

Hi there! At this current time, the Pkl project is pretty unlikely to accept contributions of new language binding libraries due to limited maintainer bandwidth. In this case in particular, as the core team lacks expertise with Ruby to maintain a high quality library.

That said, I absolutely want to encourage you to develop and publish this independently! If you need guidance, please don't hesitate to make use of our GitHub discussions, join us in our regular community development calls, or the unofficial community discord (not maintained by us). We would love to help you succeed in growing the Pkl ecosystem, even if we're not able to accept this as a contribution.

HT154 avatar Sep 09 '26 06:09 HT154

Hi @HT154! I would be happy to develop this independently and will submit whatever I have managed to contribute. (Whether if its accepted or not 😀)

KaustAbhinand avatar Sep 09 '26 07:09 KaustAbhinand