Crates.io | jq-sys |
lib.rs | jq-sys |
version | 0.2.2 |
source | src |
created_at | 2019-01-13 20:49:54.673991 |
updated_at | 2019-06-09 22:22:12.041218 |
description | Generated bindings for libjq. |
homepage | https://github.com/onelson/jq-sys |
repository | https://github.com/onelson/jq-sys |
max_upload_size | |
id | 108374 |
size | 1,558,059 |
Generated bindings for jq 1.6.
The bindings were generated with bindgen
, which is available via
cargo install
.
Example:
$ git submodule update --init
$ bindgen modules/jq/src/jq.h -o src/bindings.rs
When the bundled
feature is enabled it will add a dependency on jq-src, which
will attempt to build and link to the library. This may cover simple cases, but for
anything exotic (such as cross-building), you will want to install or build libjq
yourself.
Note: when using the
bundled
feature libjq is provided by the jq-src crate, which requiresgcc
,autoreconf
,make
, etc in yourPATH
to build.
When not using the bundled
feature, you'd either have to compile libjq
yourself, or use libs furnished by your
system package manager.
For example on debian systems, you might install libjq1 libjq-dev libonig4 libonig-dev
.
The following env vars can be used to provide hints to the build script.
Name | Purpose | Notes |
---|---|---|
JQ_LIB_DIR |
Path to the location of the library. | |
JQ_LIB_STATIC |
Use static linking instead of shared. | |
JQ_NO_ONIG |
Disable linking to oniguruma for regex support. |
|
ONIG_LIB_DIR |
Path to the location of the library. | Defaults to JQ_LIB_DIR , ignored if JQ_NO_ONIG is set. |
ONIG_LIB_STATIC |
Use static linking instead of shared. | Ignored if JQ_NO_ONIG is set. |
Note that if you are using the
pkg-config
feature and it is unable to locatelibjq
, can specify the location explicitly by settingJQ_LIB_DIR
.This may be required on debian based distros (including ubuntu) since, at the time of writing, the distro packages for
jq
do not include the.pc
files required forpkg-config
to locate the files.
bundled
feature.src/bindings.rs
with bindgen
v0.49.2.build.rs
to avoid rebuilding jq from source more often than needed
when using bundled
feature (#2).Additions:
libjq
and libonig
to be customized.pkg-config
feature (on by default) to help configure linkage, as a fallback when env vars are not set.Breaking changes:
bundled
feature is no longer enabled by default.Added bundled
feature (on by default) to allow dependents to opt in or out
from using the jq-src crate for linkage.
Initial release.