4 releases

0.1.3 Mar 23, 2024
0.1.2 Mar 20, 2024
0.1.1 Mar 17, 2024
0.1.0 Mar 4, 2024

#19 in #jq


Used in j9

MIT license

4MB
120K SLoC

C 115K SLoC // 0.1% comments Python 1.5K SLoC // 0.1% comments Happy 1K SLoC M4 438 SLoC // 0.4% comments Automake 405 SLoC // 0.1% comments C++ 335 SLoC // 0.1% comments jq 278 SLoC // 0.1% comments Jinja2 261 SLoC Shell 154 SLoC // 0.1% comments Lex 152 SLoC // 0.1% comments Rust 78 SLoC // 0.1% comments RPM Specfile 51 SLoC // 0.1% comments JavaScript 34 SLoC Batch 15 SLoC

Contains (obscure autoconf code, 11KB) jq/configure.ac, (obscure autoconf code, 3KB) jq/modules/oniguruma/configure.ac

j9-sys

j9-sys is a Rust crate that provides bindings to libjq, the library behind jq, a lightweight and flexible command-line JSON processor. It allows Rust developers to integrate jq's JSON processing features directly into their applications.

jq Version

This crate is currently using jq version 1.7.1.

Building

To build this crate, clang is required. The reason for this is that the crate uses bindgen for generating the Rust bindings to the native libjq library. bindgen itself relies on clang to parse the header files of the C library.

If you do not have clang or encounter any issues with your local environment, you can use the provided .devcontainer setup. This setup includes a pre-configured environment with Rust and clang installed, ensuring a smooth build process.

To use the .devcontainer, you need to have Docker installed and Remote - Containers extension for Visual Studio Code. Once set up, simply open the project in VS Code and choose to reopen it in a container when prompted. This will automatically set up an environment where you can build and test the crate without needing to manually install the dependencies on your system.

To build this crate, use the following command:

$ cargo build

No runtime deps