Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rust bindings for kson-lib API
Example usage
Add the library to your dependencies:
Write some code:
use Kson;
Running this with cargo run should print the following to stdout:
Obtaining kson-lib binaries
The kson-sys crate requires linking to the kson-lib binary. Our build.rs automatically
downloads a suitable binary from the kson-binaries
repository, if it can be found. In case no pre-built
binary is available for your platform, you need to manually specify how to obtain it through one of
the following environment variables:
KSON_ROOT_SOURCE_DIR: if set to the root of a KSON source tree, we will attempt to build and use the necessary binaries from there.KSON_PREBUILT_BIN_DIR: use pre-built KSON binaries from the specified directory.
A note on Windows and dynamic linking
By default we use static linking under the hood, which means you can use the kson crate without
further setup. On Windows, however, we have no choice but to use dynamic linking (due to limitations
in kotlin-native). This requires extra work from your side so the operating system can find
kson.dll when your program runs. Unfold the section below if you'd like to know more.
If you cargo add kson-sys to your dependencies, it becomes possible to automatically place the
kson.dll file next to your compiled binary through the following build script:
// build.rs
use Path;
use ;