git.delta.rocks / jrsonnet / refs/commits / 5f620e2b9aa7

difftreelog

source

README.md2.9 KiBsourcehistory
1# jrsonnet23[![release](https://img.shields.io/github/v/tag/CertainLach/jrsonnet?color=%23fb4934&label=latest%20release&style=for-the-badge)](https://github.com/CertainLach/jrsonnet/releases)4[![license](https://img.shields.io/github/license/CertainLach/jrsonnet?color=%2383a598&label=license&style=for-the-badge)](/LICENSE)5[![opencollective](https://img.shields.io/opencollective/all/jrsonnet?color=%238ec07c&style=for-the-badge)](https://opencollective.com/jrsonnet)67## What is it89[Jsonnet](https://jsonnet.org/) is a data templating language1011This Rust crate implements both jsonnet library and an alternative `jsonnet` executable based on it. For more information see [bindings](#Bindings).1213## Install1415### NixOS1617jrsonnet is packaged in nixpkgs and maintained by @CertainLach1819```sh20nix-env -iA nixpkgs.jrsonnet21```2223### MacOS2425jrsonnet is packaged to brew and maintained by @messense2627```sh28brew install jrsonnet29```3031### Windows/other linux distributions3233You can get latest build of jrsonnet in [releases](https://github.com/CertainLach/jrsonnet/releases)3435### Build from sources3637jrsonnet should build on latest stable Rust version (probally on olders, but there is no MSRV policy provided)3839Debug build will work too, but it is much slower than release4041```42cargo build --release43```4445## Why?4647There already are multiple implementations of this standard implemented in different languages: [C++](https://github.com/google/jsonnet), [Go](https://github.com/google/go-jsonnet/), [Scala](https://github.com/databricks/sjsonnet).4849This implementation shows performance better than all existing implementations. For more information see [benchmarks](#Benchmarks).5051In the end, it's always fun to implement something in Rust.5253## Bindings5455### Rust5657[![crates.io](https://img.shields.io/crates/v/jrsonnet-evaluator)](https://crates.io/crates/jrsonnet-evaluator)58[![docs.rs](https://docs.rs/jrsonnet-evaluator/badge.svg)](https://docs.rs/jrsonnet-evaluator)5960Jrsonnet is written in rust itself, so just add it as dependency6162### Python6364[![crates.io](https://img.shields.io/pypi/v/rjsonnet)](https://pypi.org/project/rjsonnet/)6566Bindings are created and maintained by @messense6768### C/C++6970Jrsonnet provides a standard `libjsonnet.so` shared library and should work as drop-in replacement for it7172### Other7374WASM bingings are also available, Java bindings (Both JNI and WASM compiled to .class) are in progress7576See [bindings](./bindings/) for more information.7778## Benchmarks7980This is the fastest implementation of jsonnet both according to official benchmarks and real-life cluster configuration templating speed.8182Official benchmark results are available [in this gist](https://gist.github.com/CertainLach/5770d7ad4836066f8e0bd91e823e451b) which may get updated sometimes. It shows tests against Golang, C++ and Scala implementations showing the best performance in all cases.8384You can generate this report via provided nix flake