Crates.io | implot |
lib.rs | implot |
version | 0.6.0 |
source | src |
created_at | 2020-10-12 16:06:01.756068 |
updated_at | 2021-09-19 07:57:51.380211 |
description | Rust bindings to https://github.com/epezent/implot |
homepage | https://github.com/4bb4/implot-rs |
repository | https://github.com/4bb4/implot-rs |
max_upload_size | |
id | 298807 |
size | 104,807 |
Rust bindings for ImPlot, built by running bindgen on cimplot.
The bindings are currently based on ImPlot version 0.9-WIP (see implot-sys/third-party for the exact commit currently pointed to). The status section below provides detailed information on implementation status.
Important note: As long as the code is pre-1.0 release, the API is expected to have breaking changes between minor versions. Patch versions should be backwards compatible. After 1.0, semver will be followed more properly.
imgui-rs requires minimum Rust version 1.40, so this project requires at least that. The sys crate compiles implot, so a C++ compiler will also be required.
Examples are being built in the implot-examples
crate in this repo. To try them out,
clone the repo, change into the implot-examples
directory and try for example
cargo run --example line_plots
For released versions, see . Make sure to look at the right release, since the API is still changing. For the master branch, the docs can be built by cloning this repository and then running
cargo doc --open
An effort is made to document everything as it is being added. Feel free to open an issue if documentation is unclear or lacking. Note that doc aliases are being added now, which means one should be able to look for things with the name they have in the C++ code and rustdoc should show the correspondingly-named item. Sometimes this is just a matter of changing camelcase to snake case, other times the idiomatic bindings do things a bit differently. These aliases only work with Rust 1.48 or newer.
Currently a work in progress, coverage of the C++ API is increased steadily. The author is open to collaboration, if you'd like to help, feel free to reach out via a Github issue.
At this point, raw bindings are working in implot-sys, and more idiomatic interfaces for plot creation as well a subset of the functionality for plots are implemented.
While the raw bindings have versions of most functions for different data types such as 32-bit or 64-bit floats and various integers, the higher-level bindings are currently only created for 64-bit floats.
This repo tries to follow the approaches and style used in imgui-rs
somewhat closely,
because implot is to be used within imgui programs, and hence keeping the interfaces
and design philosophies close should make it easier to do that.
If you spot any design inconsistencies or paper cuts, feel free to open an issue.