#json #configuration-language #json-configuration #jsonnet #data #bindings #libjsonnet

jsonnet-rs

Bindings to libjsonnet (https://jsonnet.org/), a domain specific configuration language that helps you define JSON data

3 releases (breaking)

0.17.0 Feb 1, 2021
0.6.0 May 5, 2018
0.5.0 Jan 3, 2017

#540 in Configuration

Download history 134/week @ 2024-07-27 110/week @ 2024-08-03 135/week @ 2024-08-10 124/week @ 2024-08-17 234/week @ 2024-08-24 281/week @ 2024-08-31 125/week @ 2024-09-07 101/week @ 2024-09-14 183/week @ 2024-09-21 158/week @ 2024-09-28 77/week @ 2024-10-05 103/week @ 2024-10-12 122/week @ 2024-10-19 229/week @ 2024-10-26 242/week @ 2024-11-02 200/week @ 2024-11-09

820 downloads per month
Used in 4 crates (2 directly)

Apache-2.0

2MB
33K SLoC

Jsonnet 18K SLoC // 0.2% comments C++ 10K SLoC // 0.1% comments Python 1.5K SLoC // 0.2% comments Rust 1K SLoC // 0.0% comments C 680 SLoC // 0.1% comments JavaScript 591 SLoC // 0.1% comments Shell 510 SLoC // 0.3% comments Visual Studio Project 327 SLoC Bazel 269 SLoC // 0.1% comments Java 139 SLoC // 0.4% comments Visual Studio Solution 40 SLoC Bitbake 32 SLoC

rust-jsonnet

crates.io Version Badge docs.rs Doc Badge Build Status Badge

libjsonnet bindings for Rust

[dependencies]
jsonnet-rs = "0.6"

Building rust-jsonnet

Building jsonnet-sys requires gcc (via the cc Rust crate). libjsonnet is not typically available as an existing shared library, so jsonnet-sys builds and statically links its own copy.

$ git clone https://github.com/anguslees/rust-jsonnet
$ cd rust-jsonnet
$ cargo build

See also examples/jsonnet.rs for an almost-but-not-quite drop-in replacement for the official jsonnet executable implemented using this library.

License

rust-jsonnet is distributed under the terms of the Apache License (Version 2.0), the same as libjsonnet itself.

See LICENSE for details.

Dependencies