git.delta.rocks / jrsonnet / refs/commits / 325f0a12bbb7

difftreelog

source

README.adoc3.7 KiBrenderedsourcehistory
1= jrsonnet23++++4<p align="center"><a href="https://github.com/CertainLach/jrsonnet"><img alt="jrsonnet logo" src="./docs/logowide.svg" height="150"></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="./LICENSE"><img alt="license" src="https://img.shields.io/github/license/CertainLach/jrsonnet?color=%2383a598&label=license&style=for-the-badge"></img></a>8  <a href="https://opencollective.com/jrsonnet"><img alt="opencollective" src="https://img.shields.io/opencollective/all/jrsonnet?color=%238ec07c&style=for-the-badge"></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* [NEW] 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.md[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=== Python9293image:https://img.shields.io/pypi/v/rjsonnet[alt=crates.io, link=https://pypi.org/project/rjsonnet/]9495Bindings are created and maintained by @messense9697=== C/C++9899Jrsonnet provides a standard `libjsonnet.so` shared library and should work as drop-in replacement for it100101=== Other102103WASM bingings are also available, Java bindings (Both JNI and WASM compiled to `.class`) are in progress104105See link:./bindings/[bindings] for more information.