16 releases

1.0.0 Jun 27, 2020
0.5.0-pre95 Aug 13, 2023
0.5.0-pre94 Jul 26, 2023
0.5.0-pre6 Jan 8, 2023
0.3.2 Nov 17, 2020

#534 in Template engine

Download history 1452/week @ 2024-07-20 773/week @ 2024-07-27 954/week @ 2024-08-03 979/week @ 2024-08-10 1201/week @ 2024-08-17 1008/week @ 2024-08-24 909/week @ 2024-08-31 1404/week @ 2024-09-07 1130/week @ 2024-09-14 800/week @ 2024-09-21 1181/week @ 2024-09-28 816/week @ 2024-10-05 457/week @ 2024-10-12 927/week @ 2024-10-19 547/week @ 2024-10-26 323/week @ 2024-11-02

2,311 downloads per month
Used in 14 crates (8 directly)

MIT license

375KB
13K SLoC

jrsonnet

++++

jrsonnet logo

release license opencollective

++++

// Github sucks: I can't center those images the normal way: https://github.com/github/markup/issues/984 // [.text-center] // Interactive,470, alt=jrsonnet logo // // [.text-center] // -- // alt=release, link=https://github.com/CertainLach/jrsonnet/releases // alt=license, ./LICENSE // alt=opencollective, link=https://opencollective.com/jrsonnet // --

What is it

Jsonnet is a data templating language

This Rust crate implements both jsonnet library and an alternative jsonnet executable based on it. For more information see bindings,Bindings.

Install

NixOS

jrsonnet is packaged in nixpkgs and maintained by @CertainLach

[source,sh]

nix-env -iA nixpkgs.jrsonnet

MacOS

jrsonnet is packaged to brew and maintained by @messense

[source,sh]

brew install jrsonnet

Windows/other linux distributions

You can get latest build of jrsonnet in releases.

Build from sources

jrsonnet should build on latest stable Rust version (probably on the oldest, but there is no MSRV policy provided)

Debug build will work too, but it is much slower than release

[source]

cargo build --release

Why?

There already are multiple implementations of this standard implemented in different languages:

This implementation shows performance better than all existing implementations. For more information see link:./docs/benchmarks.md[benchmarks]

Also, I wanted to experiment on new syntax features, and jrsonnet implements some of them. For more information see link:./docs/features.adoc[features]

In the end, it's always fun to implement something in Rust.

Bindings [[bindings]]

Rust

alt=crates.io, link=https://crates.io/crates/jrsonnet-evaluator alt=docs.rs, link=https://docs.rs/jrsonnet-evaluator

Jrsonnet is written in rust itself, so just add it as dependency

Python

alt=crates.io, link=https://pypi.org/project/rjsonnet/

Bindings are created and maintained by @messense

C/C++

Jrsonnet provides a standard libjsonnet.so shared library and should work as drop-in replacement for it

Other

WASM bingings are also available, Java bindings (Both JNI and WASM compiled to .class) are in progress

See link:./bindings/[bindings] for more information.

Dependencies

~7MB
~119K SLoC