1= jrsonnet23++++4<p align="center"><a href="https://delta.rocks/jrsonnet"><img alt="jrsonnet logo" src="https://delta.rocks/og/page.svg?title=jrsonnet&sig=cecb5a7de6500c39b0d284e4d14a3bef6d083ce19b8f6e77c82d70c57bf6960e&brand=jrsonnet&subtitle=fast+jsonnet+interpreter" height="300"></img></a></p>5<p align="center">6 <a href="https://github.com/CertainLach/jrsonnet/releases"><img alt="release" src="https://img.shields.io/github/v/tag/CertainLach/jrsonnet?color=%23fb4934&label=latest%20release&style=for-the-badge"></img></a>7 <a href="https://delta.rocks/donate"><img alt="donate" src="https://delta.rocks/badge/backers.svg"></img></a>8 <a href="./LICENSE"><img alt="license" src="https://delta.rocks/badge/License · MIT.svg"></img></a>9</p>10++++1112// Github sucks: I can't center those images the normal way: https://github.com/github/markup/issues/984 13// [.text-center]14// image:./docs/logowide.svg[Interactive,470, alt=jrsonnet logo]15//16// [.text-center]17// --18// image:https://img.shields.io/github/v/tag/CertainLach/jrsonnet?color=%23fb4934&label=latest%20release&style=for-the-badge[alt=release, link=https://github.com/CertainLach/jrsonnet/releases]19// image:https://img.shields.io/github/license/CertainLach/jrsonnet?color=%2383a598&label=license&style=for-the-badge[alt=license, ./LICENSE]20// image:https://img.shields.io/opencollective/all/jrsonnet?color=%238ec07c&style=for-the-badge[alt=opencollective, link=https://opencollective.com/jrsonnet]21// --2223== What is it2425https://jsonnet.org/[Jsonnet] is a data templating language2627This Rust crate implements both jsonnet library and an alternative `jsonnet` executable based on it.28For more information see <<bindings,Bindings>>.2930== Install3132=== NixOS3334jrsonnet is packaged in nixpkgs and maintained by @CertainLach3536[source,sh]37----38nix-env -iA nixpkgs.jrsonnet39----4041=== MacOS4243jrsonnet is packaged to brew and maintained by @messense4445[source,sh]46----47brew install jrsonnet48----4950=== Windows/other linux distributions5152You can get latest build of jrsonnet in https://github.com/CertainLach/jrsonnet/releases[releases].5354=== Build from sources5556jrsonnet should build on latest stable Rust version (probably on the oldest, but there is no MSRV policy provided)5758Debug build will work too, but it is much slower than release5960[source]61----62cargo build --release63----6465== Why?6667There already are multiple implementations of this standard implemented in different languages:6869* https://github.com/google/jsonnet[C++];70* https://github.com/google/go-jsonnet/[Go];71* https://github.com/databricks/sjsonnet[Scala].72* https://github.com/eduardosm/rsjsonnet[Another Rust impl appears].7374This implementation shows performance better than all existing implementations.75For more information see link:./docs/benchmarks.adoc[benchmarks]7677Also, I wanted to experiment on new syntax features, and jrsonnet implements some of them.78For more information see link:./docs/features.adoc[features]7980In the end, it's always fun to implement something in Rust.8182== Bindings [[bindings]]8384=== Rust8586image:https://img.shields.io/crates/v/jrsonnet-evaluator[alt=crates.io, link=https://crates.io/crates/jrsonnet-evaluator]87image:https://docs.rs/jrsonnet-evaluator/badge.svg[alt=docs.rs, link=https://docs.rs/jrsonnet-evaluator]8889Jrsonnet is written in rust itself, so just add it as dependency9091=== JavaScript/TypeScript (WASM)9293// image:https://img.shields.io/npm/v/jrsonnet[alt=npm, link=https://www.npmjs.com/package/jrsonnet]94image:https://jsr.io/badges/@jrsonnet/jrsonnet[alt=JSR, link=https://jsr.io/@jrsonnet/jrsonnet]95image:https://jsr.io/badges/@jrsonnet/jrsonnet/score[alt=JSR score, link=https://jsr.io/@jrsonnet/jrsonnet]9697WASM bindings are published to JSR as `@jrsonnet/jrsonnet`.9899[source,sh]100----101deno add jsr:@jrsonnet/jrsonnet102----103104// npm package (`jrsonnet`) is not yet published.105106=== Python107108image:https://img.shields.io/pypi/v/rjsonnet[alt=crates.io, link=https://pypi.org/project/rjsonnet/]109110Bindings are created and maintained by @messense111112=== C/C++113114Jrsonnet provides a standard `libjsonnet.so` shared library and should work as drop-in replacement for it115116=== Other117118Java bindings (Both JNI and WASM compiled to `.class`) are in progress119120See link:./bindings/[bindings] for more information.